You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dotc:Error:TypeApply(Select(Apply(Select(Typed(This(Ident(ThreadedImpl)),TypeTree[TypeRef(ThisType(TypeRef(NoPrefix,module classimpl)),traitThreadedImpl)]),threadSync),List()),synchronized),List(TypeTree[TypeRef(ThisType(TypeRef(NoPrefix,module classscala)),classBoolean)])) (of classdotty.tools.dotc.ast.Trees$TypeApply)
scala.MatchError:TypeApply(Select(Apply(Select(Typed(This(Ident(ThreadedImpl)),TypeTree[TypeRef(ThisType(TypeRef(NoPrefix,module classimpl)),traitThreadedImpl)]),threadSync),List()),synchronized),List(TypeTree[TypeRef(ThisType(TypeRef(NoPrefix,module classscala)),classBoolean)])) (of classdotty.tools.dotc.ast.Trees$TypeApply)
at dotty.tools.backend.jvm.BCodeBodyBuilder.lhs$lzyINIT1$1(BCodeBodyBuilder.scala:1310)
at dotty.tools.backend.jvm.BCodeBodyBuilder.dotty$tools$backend$jvm$BCodeBodyBuilder$PlainBodyBuilder$$_$lhs$1(BCodeBodyBuilder.scala:1310)
at dotty.tools.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.dotty$tools$backend$jvm$BCodeBodyBuilder$PlainBodyBuilder$$genCond(BCodeBodyBuilder.scala:1324)
at dotty.tools.backend.jvm.BCodeBodyBuilder.dotty$tools$backend$jvm$BCodeBodyBuilder$PlainBodyBuilder$$_$genZandOrZor$1(BCodeBodyBuilder.scala:1321)
at dotty.tools.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.dotty$tools$backend$jvm$BCodeBodyBuilder$PlainBodyBuilder$$genCond(BCodeBodyBuilder.scala:1326)
at dotty.tools.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genPrimitiveOp(BCodeBodyBuilder.scala:245)
at dotty.tools.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genApply(BCodeBodyBuilder.scala:774)
at dotty.tools.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:356)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.emitNormalMethodBody$1(BCodeSkelBuilder.scala:708)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genDefDef(BCodeSkelBuilder.scala:743)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen(BCodeSkelBuilder.scala:591)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen$$anonfun$1(BCodeSkelBuilder.scala:597)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen(BCodeSkelBuilder.scala:597)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genPlainClass(BCodeSkelBuilder.scala:223)
at dotty.tools.backend.jvm.GenBCodePipeline$Worker1.visit(GenBCode.scala:227)
at dotty.tools.backend.jvm.GenBCodePipeline$Worker1.run(GenBCode.scala:192)
at dotty.tools.backend.jvm.GenBCodePipeline.buildAndSendToDisk(GenBCode.scala:531)
at dotty.tools.backend.jvm.GenBCodePipeline.run(GenBCode.scala:497)
at dotty.tools.backend.jvm.GenBCode.run(GenBCode.scala:58)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:296)
at scala.collection.immutable.List.map(List.scala:250)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:297)
at dotty.tools.backend.jvm.GenBCode.runOn(GenBCode.scala:62)
at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:180)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
at dotty.tools.dotc.Run.runPhases$5(Run.scala:190)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:198)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:64)
at dotty.tools.dotc.Run.compileUnits(Run.scala:205)
at dotty.tools.dotc.Run.compileSources(Run.scala:142)
at dotty.tools.dotc.Run.compile(Run.scala:124)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:38)
at dotty.tools.dotc.Driver.process(Driver.scala:195)
at dotty.tools.dotc.Main.process(Main.scala)
at xsbt.CachedCompilerImpl.run(CachedCompilerImpl.java:69)
Expectation
should compile
The text was updated successfully, but these errors were encountered:
isPrimitive/getPrimitive are overloaded: they both have a version which
takes a symbol as input and a version which takes a tree, the latter can
handle array get and set primitives which map to different JVM
instructions depending on their type, but we don't care about that when
emitting conditions in genCond: we only need to look for primitives
which correspond to boolean operations and those are already handled by
the symbol versions of isPrimitive/getPrimitive. By using these methods
in genCond we avoid running some unnecessary code and we fixscala#9775 which
was triggered because the `getPrimitive` overload we were using required
forcing `lhs`. This change also aligns us with what the scalac backend
does.
Minimized code
https://scastie.scala-lang.org/NO2TNVGaTtae15HdFyHW5Q
Output
crashes with
Expectation
should compile
The text was updated successfully, but these errors were encountered: