Skip to content
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

AssertionError: unaccounted modifier #5037

Closed
sir-wabbit opened this issue Aug 26, 2018 · 1 comment · Fixed by #14857
Closed

AssertionError: unaccounted modifier #5037

sir-wabbit opened this issue Aug 26, 2018 · 1 comment · Fixed by #14857

Comments

@sir-wabbit
Copy link

class Foo {
abstract override var
}
Exception in thread "main" java.lang.AssertionError: assertion failed: unaccounted modifier: Abstract() in Modifiers(mutable abstract override,,List(),List(Abstract(), Override())) when adding List(Abstract(), Override(), Var())
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:38)
	at dotty.tools.dotc.ast.untpd$Modifiers.withMods$$anonfun$1(untpd.scala:180)
	at scala.compat.java8.JProcedure1.apply(JProcedure1.java:18)
	at scala.compat.java8.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at dotty.tools.dotc.ast.untpd$Modifiers.withMods(untpd.scala:182)
	at dotty.tools.dotc.ast.untpd$Modifiers.withAddedMod(untpd.scala:170)
	at dotty.tools.dotc.parsing.Parsers$Parser.addMod(Parsers.scala:1784)
	at dotty.tools.dotc.parsing.Parsers$Parser.defOrDcl(Parsers.scala:2110)
	at dotty.tools.dotc.parsing.Parsers$Parser.templateStatSeq$$anonfun$1(Parsers.scala:2519)
	at dotty.tools.dotc.parsing.Parsers$Parser.checkNoEscapingPlaceholders(Parsers.scala:395)
	at dotty.tools.dotc.parsing.Parsers$Parser.templateStatSeq(Parsers.scala:2527)
	at dotty.tools.dotc.parsing.Parsers$Parser.$anonfun$15(Parsers.scala:2423)
	at dotty.tools.dotc.parsing.Parsers$Parser.enclosed(Parsers.scala:428)
	at dotty.tools.dotc.parsing.Parsers$Parser.inBraces(Parsers.scala:436)
	at dotty.tools.dotc.parsing.Parsers$Parser.inDefScopeBraces(Parsers.scala:441)
	at dotty.tools.dotc.parsing.Parsers$Parser.templateBody(Parsers.scala:2423)
	at dotty.tools.dotc.parsing.Parsers$Parser.$anonfun$14(Parsers.scala:2418)
	at dotty.tools.dotc.parsing.Parsers$Parser.withinEnum(Parsers.scala:340)
	at dotty.tools.dotc.parsing.Parsers$Parser.templateBodyOpt(Parsers.scala:2418)
	at dotty.tools.dotc.parsing.Parsers$Parser.template(Parsers.scala:2393)
	at dotty.tools.dotc.parsing.Parsers$Parser.templateOpt(Parsers.scala:2410)
	at dotty.tools.dotc.parsing.Parsers$Parser.classDefRest(Parsers.scala:2293)
	at dotty.tools.dotc.parsing.Parsers$Parser.classDef(Parsers.scala:2288)
	at dotty.tools.dotc.parsing.Parsers$Parser.tmplDef(Parsers.scala:2270)
	at dotty.tools.dotc.parsing.Parsers$Parser.topStatSeq(Parsers.scala:2468)
	at dotty.tools.dotc.parsing.Parsers$Parser.topstats$2(Parsers.scala:2644)
	at dotty.tools.dotc.parsing.Parsers$Parser.compilationUnit$$anonfun$1(Parsers.scala:2649)
	at dotty.tools.dotc.parsing.Parsers$Parser.checkNoEscapingPlaceholders(Parsers.scala:395)
	at dotty.tools.dotc.parsing.Parsers$Parser.compilationUnit(Parsers.scala:2654)
	at dotty.tools.dotc.parsing.Parsers$Parser.parse(Parsers.scala:160)

AE-51a0a24162ba4b6d7ff8fae378973c5350d2737b

odersky added a commit to dotty-staging/dotty that referenced this issue Apr 5, 2022
michelou pushed a commit to michelou/scala3 that referenced this issue Apr 25, 2022
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants