Skip to content

compiler crash in variance checks with erroneous use of someVal.super.someMethod #9911

@scabug

Description

@scabug
// This should say:
// Error: super may not be used on value source
class ScalacBug {

  class SomeClass {

    type U

    // Changing T or U stops the problem
    def getSomething[T]: U = ???
  }

  trait Base {

    // Changing this to a def like it should be stops the problem
    val source: SomeClass = ???
  }

  class Bug extends Base {

    override val source = {
      // Not calling the function stops the problem
      super.source.getSomething
      ???
    }
  }

}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions