-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add an error message for illegal start of simple pattern - Parsers.scala:1437 #1700
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 an error message for illegal start of simple pattern - Parsers.scala:1437 #1700
Conversation
case class IllegalStartOfSimplePattern()(implicit ctx: Context) extends Message(32) { | ||
val kind = "Syntax" | ||
val msg = "illegal start of simple pattern" | ||
val explanation = "" |
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.
This message doesn't really add anything to justify its existence currently. Some things to consider for the explanation:
- When does this occur?
- What is a simple expression?
- Is there perhaps something that could be added to the message in order to help tooling / the user?
Let's try to put some semantics into this :)
@felixmulder PTAL |
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.
Some minor changes needed otherwise LGTM 👍
| case List(_, second, x:_*) => second | ||
| case _ => 0 | ||
|}""" | ||
hl"""|Simple pattern can be divided into several groups: |
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.
patterns*
| A special case is the wild-card pattern _ which is treated as if it was a fresh | ||
| variable on each occurrence. | ||
| | ||
|- Typed Patterns: ${"case x:Int => ..."} or ${"case _:Int => ..."}. |
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.
space after :
@felixmulder PTAL. BTW, I ran the 'partest' task from 'sbt' and here's what I've got:
I'm not really sure why the jenkins build failed 😞 |
Let's just try rebuilding on the CI first |
/rebuild |
it failed again :( |
Hmm, yes. Your branch's working on my machine - @smarter, could you rerun this on a different behemoth? |
@felixmulder Looks like it's working again! PTAL |
LGTM, thanks @maseev! |
This pull request is related to the following issue.