Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
scabug opened this issue Sep 2, 2016 · 1 comment · Fixed by scala/scala#8545
Closed

Comments

@scabug
Copy link

scabug commented Sep 2, 2016

// 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
      ???
    }
  }

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants