You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a bug in parboiled2 or in scalac but it is at least weird behavior.
What you are seeing is a limitation of the compiler's type inference logic.
The compiler cannot fully infer the type of the function if you use the case (a, b) => ... notation.
This has nothing to do with pb2.
By explicitly typing the type of f one gets the errors ...
Yes, this is a very weird compiler bug that we've also been seeing ourselves.
Sometimes adding a type annotation (the correct one!) triggers a compiler error.
There doesn't appear to be anything we can do from our side to fix this.
I guess #106 would be the only option.
As a general guideline we only attach explicit type annotations to rules where they are required due to recursion or where we really want to see them for documentation reasons.
The following code compiles fine:
But the following does not:
The error is:
I'm not sure if this is a bug in parboiled2 or in scalac but it is at least weird behavior.
It can become even worse:
By explicitly typing the type of
f
one gets the errors:The text was updated successfully, but these errors were encountered: