test/langtools/tools/javac/generics/diamond/neg/Neg08.java
author phh
Sat, 30 Nov 2019 14:33:05 -0800
changeset 59330 5b96c12f909d
parent 47216 71c04702a3d5
permissions -rw-r--r--
8234541: C1 emits an empty message when it inlines successfully Summary: Use "inline" as the message when successfull Reviewed-by: thartmann, mdoerr Contributed-by: navy.xliu@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 7020043 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 diamond is not allowed with non-generic class types
383a416a2bdf 7020044: Project Coin: diamond erroneous allowed on some anonymous inner classes
mcimadamore
parents: 5321
diff changeset
     6
 * @author Rémi Forax
5321
c8efe769cb3b 6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff changeset
     7
 * @compile/fail/ref=Neg08.out Neg08.java -XDrawDiagnostics
c8efe769cb3b 6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff changeset
     8
 *
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
class Neg08 {
8635
383a416a2bdf 7020044: Project Coin: diamond erroneous allowed on some anonymous inner classes
mcimadamore
parents: 5321
diff changeset
    12
   public static void main(String[] args) {
383a416a2bdf 7020044: Project Coin: diamond erroneous allowed on some anonymous inner classes
mcimadamore
parents: 5321
diff changeset
    13
     String s = new String<>("foo");
383a416a2bdf 7020044: Project Coin: diamond erroneous allowed on some anonymous inner classes
mcimadamore
parents: 5321
diff changeset
    14
   }
5321
c8efe769cb3b 6939620: Switch to 'complex' diamond inference scheme
mcimadamore
parents:
diff changeset
    15
}