Skip to content

Compiler crash with AssertionError "mixed in lazy value .. from class .. is not param?!" #10223

Open
@scabug

Description

@scabug

The code:

object Broken {
  trait Parent
  class Child extends Parent

  trait Test { lazy val x: Child = new Child }
  abstract class Test2 extends Test { override def x: Parent }
}

Causes the compiler to assertion fail:

java.lang.AssertionError: assertion failed:
  mixed in lazy value x from class Broken$Test2 is not param?!?
     while compiling: C:\Users\anixon\source\myproject\src\test\scala\myproject\Broken.scala
        during phase: globalPhase=mixin, enteringPhase=cleanup
     library version: version 2.12.1
    compiler version: version 2.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler crashfixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)mixin

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions