-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: assertion failed: leak #16954
Comments
xuwei-k
added
itype:bug
itype:crash
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Feb 18, 2023
nicolasstucki
added
area:metaprogramming:quotes
Issues related to quotes and splices
and removed
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Feb 20, 2023
This code should not be accepted. We would need to add the inverse of |
The code emits the correct error message before crashing 15 | classOf[x]
| ^
| x is not a class type |
Minimizationdef test =
type y
classOf[y] Failure3 | classOf[y]
| ^
| y is not a class type
java.lang.AssertionError: assertion failed: leak: y in {
type y >: Nothing <: Any
classOf[y]:(classOf[y] : Class[y])
} while typechecking tests/pos-macros/i16954.scala
exception occurred while typechecking tests/pos-macros/i16954.scala
exception occurred while compiling tests/pos-macros/i16954.scala
java.lang.AssertionError: assertion failed: leak: y in {
type y >: Nothing <: Any
classOf[y]:(classOf[y] : Class[y])
} while compiling tests/pos-macros/i16954.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: leak: y in {
type y >: Nothing <: Any
classOf[y]:(classOf[y] : Class[y])
}
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at dotty.tools.dotc.typer.Typer.ensureNoLocalRefs(Typer.scala:1165)
at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1121)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2955)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3010)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3077)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3081)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3193)
at dotty.tools.dotc.typer.Namer.typedAheadExpr$$anonfun$1(Namer.scala:1645)
at dotty.tools.dotc.typer.Namer.typedAhead(Namer.scala:1635)
at dotty.tools.dotc.typer.Namer.typedAheadExpr(Namer.scala:1645)
at dotty.tools.dotc.typer.Namer.typedAheadRhs$1$$anonfun$1(Namer.scala:1898)
at dotty.tools.dotc.inlines.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:249)
at dotty.tools.dotc.typer.Namer.typedAheadRhs$1(Namer.scala:1898)
at dotty.tools.dotc.typer.Namer.rhsType$1(Namer.scala:1906)
at dotty.tools.dotc.typer.Namer.cookedRhsType$1(Namer.scala:1924)
at dotty.tools.dotc.typer.Namer.lhsType$1(Namer.scala:1925)
at dotty.tools.dotc.typer.Namer.inferredResultType(Namer.scala:1936)
at dotty.tools.dotc.typer.Namer.inferredType$1(Namer.scala:1683)
at dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:1690)
at dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1781)
at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:791)
at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:926)
at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:814)
at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:174)
at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:187)
at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:189)
at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:390)
at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:2888)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2913)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3009)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3077)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3081)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3103)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3149)
at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:2581)
at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:2935)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2939)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3009)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3077)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3081)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3103)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3149)
at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2711)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2980)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3010)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3077)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3081)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3193)
at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:44)
at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$adapted$1(TyperPhase.scala:54)
at scala.Function0.apply$mcV$sp(Function0.scala:42)
at dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:437)
at dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:54)
at dotty.tools.dotc.typer.TyperPhase.runOn$$anonfun$3(TyperPhase.scala:88)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:88)
at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:247)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1321)
at dotty.tools.dotc.Run.runPhases$1(Run.scala:263)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:271)
at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:280)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
at dotty.tools.dotc.Run.compileUnits(Run.scala:280)
at dotty.tools.dotc.Run.compileSources(Run.scala:195)
at dotty.tools.dotc.Run.compile(Run.scala:179)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
at dotty.tools.dotc.Driver.process(Driver.scala:195)
at dotty.tools.dotc.Driver.process(Driver.scala:163)
at dotty.tools.dotc.Driver.process(Driver.scala:175)
at dotty.tools.dotc.Driver.main(Driver.scala:205)
at dotty.tools.dotc.Main.main(Main.scala) |
nicolasstucki
added
area:typer
and removed
area:metaprogramming:quotes
Issues related to quotes and splices
labels
Feb 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: