Commit 051848e
authored
- Code is legit and should compile
- It indeed was an error in 3.1.0. When tested locally, I got the
following stack trace (different from the one in the issue):
```scala
hamzaremmal@macbook scala3 % scalac test.scala -d out -Xprint:typer
exception occurred while typechecking test.scala
exception occurred while compiling test.scala
java.lang.AssertionError: NoDenotation.owner while compiling test.scala
Exception in thread "main" java.lang.AssertionError: NoDenotation.owner
at dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:2503)
at dotty.tools.dotc.typer.Nullables$.usedOutOfOrder(Nullables.scala:260)
at dotty.tools.dotc.typer.Nullables$.isTracked(Nullables.scala:161)
at dotty.tools.dotc.typer.Nullables$TrackedRef$.unapply(Nullables.scala:127)
at dotty.tools.dotc.typer.Nullables$.caseContext(Nullables.scala:179)
at dotty.tools.dotc.typer.Typer.typedCase(Typer.scala:1653)
at dotty.tools.dotc.typer.Typer.typedCases$$anonfun$1(Typer.scala:1583)
at dotty.tools.dotc.core.Decorators$ListDecorator$.loop$1(Decorators.scala:92)
at dotty.tools.dotc.core.Decorators$ListDecorator$.mapconserve$extension(Decorators.scala:108)
at dotty.tools.dotc.typer.Typer.typedCases(Typer.scala:1585)
at dotty.tools.dotc.typer.Typer.$anonfun$20(Typer.scala:1575)
at dotty.tools.dotc.typer.Applications.harmonic(Applications.scala:2190)
at dotty.tools.dotc.typer.Applications.harmonic$(Applications.scala:317)
```
Closes #13889
1 parent b82ab3a commit 051848e
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments