-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #6795: Print flagString #6797
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
Conversation
@@ -284,7 +284,7 @@ class Namer { typer: Typer => | |||
case _ => (flags.isTermFlags, flags.toTermFlags, "value") | |||
} | |||
if (!ok) | |||
ctx.error(i"modifier(s) `$flags' incompatible with $kind definition", tree.sourcePos) | |||
ctx.error(i"modifier(s) `${flags.flagsString}' incompatible with $kind definition", tree.sourcePos) |
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.
Should this not be:
`${flags.flagsString}`
That is, a backtick at the end rather than a single quote?
@@ -1504,7 +1504,7 @@ object messages { | |||
case class AbstractMemberMayNotHaveModifier(sym: Symbol, flag: FlagSet)( | |||
implicit ctx: Context) | |||
extends Message(AbstractMemberMayNotHaveModifierID) { | |||
val msg: String = em"""${hl("abstract")} $sym may not have `$flag' modifier""" | |||
val msg: String = em"""${hl("abstract")} $sym may not have `${flag.flagsString}' modifier""" |
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.
Same thing with the backtick here
tests/neg/i6795-b.check
Outdated
-- [E083] Syntax Error: tests/neg/i6795-b.scala:1:11 ------------------------------------------------------------------- | ||
1 |sealed def y: Int = 1 // error | ||
| ^ | ||
| Modifier(s) sealed not allowed for method |
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.
I think we should be consistent in how we quote these modifiers. If erased
is quoted with backticks, sealed
should be as well
No description provided.