-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added error message for Symbol is not a value #1589 #3746
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,7 +208,7 @@ object messages { | |
|
||
case class WildcardOnTypeArgumentNotAllowedOnNew()(implicit ctx: Context) | ||
extends Message(WildcardOnTypeArgumentNotAllowedOnNewID) { | ||
val kind = "syntax" | ||
val kind = "Syntax" | ||
val msg = "type argument must be fully defined" | ||
|
||
val code1 = | ||
|
@@ -2064,4 +2064,11 @@ object messages { | |
val explanation = | ||
hl"An object that contains ${"@static"} members must have a companion class." | ||
} | ||
|
||
case class SymbolIsNotAValue(symbol: Symbol)(implicit ctx: Context) extends Message(SymbolIsNotAValueID) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed the class name, ID and test name too. |
||
val msg = hl"${symbol.show} is not a value" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need show here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the show method. |
||
val kind = "Type Mismatch" | ||
val explanation = | ||
hl"Scala or Java packages cannot be assigned to a value" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scala packages can be used as values if they have a package object.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What should be the explanation then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found the relevant conversation. I will write a better explanation based on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I updated the 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 was the only place where this string started with a lowercase. I assumed it was a typo, if somebody could confirm it, it would be good.
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.
Good