test/langtools/tools/javac/defaultMethods/Neg14.java
author darcy
Fri, 02 Feb 2018 10:29:25 -0800
changeset 48723 6cb86bf0b51e
parent 47216 71c04702a3d5
permissions -rw-r--r--
8196623: Update JavaBaseTest.java to be version agnostic Reviewed-by: vromero
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19934
1d8232b1aa18 8005222: Fixed bugs should have tests with bugid in @bug tag
jfranck
parents: 14547
diff changeset
     1
/* @test /nodynamiccopyright/
1d8232b1aa18 8005222: Fixed bugs should have tests with bugid in @bug tag
jfranck
parents: 14547
diff changeset
     2
 * @bug 7192246
14443
91c05eb19277 7192246: Add type-checking support for default methods
mcimadamore
parents:
diff changeset
     3
 * @summary check that a class cannot have two sibling interfaces with a default and abstract method
14547
86d8d242b0c4 8003280: Add lambda tests
mcimadamore
parents: 14443
diff changeset
     4
 * @compile/fail/ref=Neg14.out -XDrawDiagnostics Neg14.java
14443
91c05eb19277 7192246: Add type-checking support for default methods
mcimadamore
parents:
diff changeset
     5
 */
91c05eb19277 7192246: Add type-checking support for default methods
mcimadamore
parents:
diff changeset
     6
class Neg14 {
91c05eb19277 7192246: Add type-checking support for default methods
mcimadamore
parents:
diff changeset
     7
    interface IA { int m(); }
91c05eb19277 7192246: Add type-checking support for default methods
mcimadamore
parents:
diff changeset
     8
    interface IB { default int m() { return 1; } }
91c05eb19277 7192246: Add type-checking support for default methods
mcimadamore
parents:
diff changeset
     9
91c05eb19277 7192246: Add type-checking support for default methods
mcimadamore
parents:
diff changeset
    10
    abstract class AB implements IA, IB {}
91c05eb19277 7192246: Add type-checking support for default methods
mcimadamore
parents:
diff changeset
    11
}