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 when doing structural typing with missing parameter lists #8098

Open
scabug opened this issue Dec 23, 2013 · 1 comment
Open
Labels
backend compiler crash fixed in Scala 3 This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/) implicit structural types
Milestone

Comments

@scabug
Copy link

scabug commented Dec 23, 2013

The following snippet slays the compiler:

class Foo {
  def duck()(times: Int) = this
}

object Bar {  
  def duckDuckGo[T](t: T { 
    def duck() /* (times: Int) */ : T 
  }) = {}

  duckDuckGo(new Foo())
}
uncaught exception during compilation: scala.reflect.internal.Types$NoCommonType
error: scala.reflect.internal.Types$NoCommonType: lub/glb of incompatible types: (implicit times: Int)Foo and Foo

There were a couple of related errors I came upon whilst trimming down the reproducible, but for now, this seems to be the core issue.

@scabug
Copy link
Author

scabug commented Dec 23, 2013

Imported From: https://issues.scala-lang.org/browse/SI-8098?orig=1
Reporter: @melezov
Affected Versions: 2.10.3

@scabug scabug added this to the Backlog milestone Apr 7, 2017
@SethTisue SethTisue added the fixed in Scala 3 This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/) label Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend compiler crash fixed in Scala 3 This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/) implicit structural types
Projects
None yet
Development

No branches or pull requests

2 participants