author | mcimadamore |
Mon, 21 Jan 2013 20:13:56 +0000 | |
changeset 15374 | fb8f6acf09cc |
parent 8635 | 383a416a2bdf |
permissions | -rw-r--r-- |
5321
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
1 |
/* |
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
8635
383a416a2bdf
7020044: Project Coin: diamond erroneous allowed on some anonymous inner classes
mcimadamore
parents:
5321
diff
changeset
|
3 |
* @bug 6939620 7020044 |
5321
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
4 |
* |
8635
383a416a2bdf
7020044: Project Coin: diamond erroneous allowed on some anonymous inner classes
mcimadamore
parents:
5321
diff
changeset
|
5 |
* @summary Check that 'complex' diamond can infer type that is too specific |
5321
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
6 |
* @author mcimadamore |
15374
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
8635
diff
changeset
|
7 |
* @compile/fail/ref=Neg10.out -source 7 -Xlint:-options Neg10.java -XDrawDiagnostics |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
8635
diff
changeset
|
8 |
* @compile Neg10.java -XDrawDiagnostics |
5321
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
9 |
* |
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
10 |
*/ |
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
11 |
|
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
12 |
class Neg10 { |
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
13 |
static class Foo<X> { |
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
14 |
Foo(X x) {} |
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
15 |
} |
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
16 |
|
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
17 |
Foo<Number> fw = new Foo<>(1); |
c8efe769cb3b
6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff
changeset
|
18 |
} |