-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unbound placeholder parameter message. #1618
Add unbound placeholder parameter message. #1618
Conversation
|Note that this use of `_` is not placeholder syntax, | ||
|but an uninitialized var definition | ||
""".stripMargin | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job generalizing this error!
For the explanation
I would inline the values codeUnboundInBlock
, codeBoundInBlock
, codeUnboundVal
and codeVar
, which would get the error message down from 55 lines to roughly 30.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that makes sense, the PR has been updated.
54a1ced
to
726b129
Compare
Looks good @rubenpieters - could you bump the |
726b129
to
273df6b
Compare
Ok done. |
@rubenpieters - unfortunately merging the other PR caused this to become a merge conflict. So it needs to be rebased. Sorry about that :( |
273df6b
to
bf80147
Compare
No problem, the conflicts have been resolved. |
Merged! Thanks for your patience 🎉 |
Part of #1589
Addition of message for the 'unbound placeholder parameter' error message (Parsers.scala 337).
I tried to check what is available in the vd ValDef in checkNoEscapingPlaceholders (Parsers.scala 330), but I couldn't really find anything which could be used to enhance the error message.