Skip to content

Conversation

@hamzaremmal
Copy link
Member

  • 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):
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

@Gedochao Gedochao merged commit 051848e into scala:main Dec 4, 2025
46 checks passed
@hamzaremmal hamzaremmal deleted the i13889 branch December 4, 2025 10:46
lidaisy pushed a commit to lidaisy/scala3 that referenced this pull request Dec 5, 2025
- 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 scala#13889
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash by combining match types, intersection types and structural types

2 participants