diff --git a/compiler/src/dotty/tools/dotc/parsing/Tokens.scala b/compiler/src/dotty/tools/dotc/parsing/Tokens.scala index b3728ac0f547..ad5e9aab0e6d 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Tokens.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Tokens.scala @@ -301,7 +301,8 @@ object Tokens extends TokensCommon { final val closingParens = BitSet(RPAREN, RBRACKET, RBRACE) - final val softModifierNames = Set(nme.inline, nme.into, nme.opaque, nme.open, nme.transparent, nme.infix, nme.update) + final val softModifierNames = Set(nme.inline, nme.into, nme.opaque, nme.open, nme.transparent, nme.infix) + // Note: update, consume and erased are missing here since they are only modifiers under some import def showTokenDetailed(token: Int): String = debugString(token) diff --git a/tests/neg/i24371.scala b/tests/neg/i24371.scala new file mode 100644 index 000000000000..6ad9177a3943 --- /dev/null +++ b/tests/neg/i24371.scala @@ -0,0 +1,4 @@ +class M extends caps.Mutable: + update def foo = () // error // error + +