-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added error messages - Parsers.scala:712 #1842
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
Added error messages - Parsers.scala:712 #1842
Conversation
8244f4c
to
44b8b5c
Compare
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.
Looks greatl (mostly)! A few minor snags, then we can merge this 👍
@@ -5,10 +5,9 @@ package diagnostic | |||
|
|||
import dotc.core._ | |||
import Contexts.Context, Decorators._, Symbols._, Names._, NameOps._, Types._ | |||
import util.{SourceFile, NoSource} | |||
import util.{SourcePosition, NoSourcePosition} | |||
import util.SourcePosition |
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 line shouldn't need to be added IIRC.
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.
These imports that were removed were unused, that's why I removed them. util.SourcePosition
still needs to be included as it is in use in the MessageContainers.
I can put the imports back in if that's what you want
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.
Nah, it's fine boyscout principle right? 😃. The one below however didn't need to change right?
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.
That was my idea in cleaning up the used imports! 😄
No the one below shouldn't have changed, I've fixed that. That might have been the IDE trying to tidy up for me!
import config.Settings.Setting | ||
import interfaces.Diagnostic.{ERROR, WARNING, INFO} | ||
import interfaces.Diagnostic.{ERROR, INFO, WARNING} |
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 one shouldn't need to be changed either.
val kind = "Syntax" | ||
val msg = "Existential types are no longer supported - use a wildcard or dependent type instead" | ||
val explanation = | ||
hl"""| The use of existential types is no longer supported and a wildcard or dependent type should be used instead |
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 row is too long, max should be 80 characters, split it so that it is shorter than 80 (preferably even shorter).
| Try using a wildcard type variable | ||
| | ||
| ${"List[_]"} | ||
|""" |
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.
Throughout this explanation, there's no need for there to be a padding of whitespace after the |
-signs. None of the other messages should be doing this.
LGTM - thanks for the PR! 🎉 |
No description provided.