Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/reporting/messages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2455,7 +2455,7 @@ import transform.SymUtils._
|""".stripMargin
}

class ModifierNotAllowedForDefinition(flag: Flag)(using Context)
class ModifierNotAllowedForDefinition(flag: FlagSet)(using Context)
extends SyntaxMsg(ModifierNotAllowedForDefinitionID) {
def msg = s"Modifier `${flag.flagsString}` is not allowed for this definition"
def explain = ""
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Checking.scala
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ object Checking {
if sym.isAllOf(flag1 | flag2) then fail(i"illegal combination of modifiers: `${flag1.flagsString}` and `${flag2.flagsString}` for: $sym")
def checkApplicable(flag: FlagSet, ok: Boolean) =
if (!ok && !sym.is(Synthetic))
fail(ModifierNotAllowedForDefinition(Erased))
fail(ModifierNotAllowedForDefinition(flag))

if (sym.is(Inline) &&
( sym.is(ParamAccessor) && sym.owner.isClass
Expand Down