-
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
Changes from 2 commits
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 |
---|---|---|
|
@@ -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 commentThe 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? |
||
adapted | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- [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 commentThe 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 |
||
|
||
longer explanation available when compiling with `-explain` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sealed def y: Int = 1 // error |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- Error: tests/neg/i6795.scala:1:13 ----------------------------------------------------------------------------------- | ||
1 |erased class Foo // error | ||
|^^^^^^^^^^^^^^^^ | ||
|modifier(s) `erased' incompatible with type definition |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
erased class Foo // error |
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