author | mcimadamore |
Tue, 12 Mar 2013 16:02:13 +0000 | |
changeset 16340 | 3c0af3413e0f |
parent 16293 | bf5e87940aee |
permissions | -rw-r--r-- |
16293
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
1 |
/* |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
3 |
* @bug 8007285 |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
4 |
* @summary AbstractMethodError instead of compile-time error when method reference with super and abstract |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
5 |
* @compile/fail/ref=MethodReference62.out -XDrawDiagnostics MethodReference62.java |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
6 |
*/ |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
7 |
class MethodReference62 { |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
8 |
interface SAM { |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
9 |
int m(); |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
10 |
} |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
11 |
|
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
12 |
static abstract class Sup { |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
13 |
abstract int foo() ; |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
14 |
} |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
15 |
|
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
16 |
static abstract class Sub extends Sup { |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
17 |
abstract int foo() ; |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
18 |
void test() { |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
19 |
SAM s = super::foo; |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
20 |
} |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
21 |
} |
bf5e87940aee
8007285: AbstractMethodError instead of compile-time error when method reference with super and abstract
mcimadamore
parents:
diff
changeset
|
22 |
} |