-
Notifications
You must be signed in to change notification settings - Fork 21
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
AbstractMethodError caused by bad signature on bridge methods #7535
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7535?orig=1 |
@retronym said (edited on May 31, 2013 5:06:37 PM UTC): trait Def {
type Element >: Null
trait Motor {
type Element = Def.this.Element
}
}
trait Def2 extends Def {
trait Element
trait Motor extends super.Motor {
def foo(parent: Element): Any
foo(null)
}
}
trait Def3 extends Def2 {
trait Element
new super.Motor {
def foo(e:Element): Any = null
}
}
new Def3 {} // java.lang.AbstractMethodError: Main$$anon$3$Def3$$anon$2.foo(LMain$$anon$3$Def2$Element;)Ljava/lang/Object; |
@retronym said: trait Def {
type Element >: Null
trait Motor {
type Element = Def.this.Element
}
}
trait Def2 extends Def {
type Element >: Null <: Element2
trait Element2
trait Motor extends super.Motor {
def foo(parent: Element): Any
foo(null)
}
}
trait Def3 extends Def2 {
type Element >: Null <: Element3
trait Element3 extends super.Element2
new super.Motor {
def foo(e:Element): Any = null
}
}
new Def3 {}
|
Reopening as one guise (or one guy's) from the umbrella ticket.
Retronym's example just passed its ten-year best-by date, but it's still fresh. Repeating in case I pasted it wrong:
|
It should be an error, probably at
|
This one is from the mailing list
It compiles without error but running causes
I haven't made any attempt to minify yet.
The text was updated successfully, but these errors were encountered: