Skip to content

Compiler crashes when named tuple with apply field is used #24021

@road21

Description

@road21

Compiler version

3.7.2

Minimized code

(apply = () => 1)(())

Output

Compiler crashes with error:

....
dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:1103)
dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3621)
dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3733)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:3811)
dotty.tools.dotc.typer.Typer.typed(Typer.scala:3816)
dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3927)
dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:1098)
dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1299)
dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:470)
dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:155)
dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3646)
....

Expectation

No crash

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions