Skip to content

Typing error while compiling value classes from TASTY #3462

Closed
@nicolasstucki

Description

@nicolasstucki

When compiling from tasty (tests in tests/posFromTasty/)

package foo
class Foo(a: Int) extends AnyVal

When recompiling the code loaded from tasty there is a type mismatch in

exception while typing $this.a.==(x$0.a) of class class dotty.tools.dotc.ast.Trees$Apply # 7640
exception while typing x$0 match 
  {
    case x$0 @ _: foo.Foo => $this.a.==(x$0.a)
    case _: Any => false
  } of class class dotty.tools.dotc.ast.Trees$Match # 7648

...
checking simpleValueClass1.scala after phase MegaPhase{checkStatic, elimRepeated, normalizeFlags, extmethods, expandSAMs, tailrec, byNameClosures, liftTry, hoistSuperArgs, classOf, refchecks}
java.lang.AssertionError: assertion failed: found:    x$0.a.type
required: Any

The issue is that x$0.a.type as no type.

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