diff options
Diffstat (limited to 'javatests/com/google/turbine/binder/BinderErrorTest.java')
-rw-r--r-- | javatests/com/google/turbine/binder/BinderErrorTest.java | 53 |
1 files changed, 51 insertions, 2 deletions
diff --git a/javatests/com/google/turbine/binder/BinderErrorTest.java b/javatests/com/google/turbine/binder/BinderErrorTest.java index 6766470..a1bea05 100644 --- a/javatests/com/google/turbine/binder/BinderErrorTest.java +++ b/javatests/com/google/turbine/binder/BinderErrorTest.java @@ -681,7 +681,9 @@ public class BinderErrorTest { "class T extends T {}", }, { - "<>:1: error: cycle in class hierarchy: T", "class T extends T {}", " ^", + "<>:1: error: cycle in class hierarchy: T", // + "class T extends T {}", + " ^", }, }, { @@ -692,6 +694,19 @@ public class BinderErrorTest { "<>:1: error: cycle in class hierarchy: T", "class T implements T {}", " ^", + "<>:1: error: expected interface type", + "class T implements T {}", + " ^", + }, + }, + { + { + "interface T extends T {}", + }, + { + "<>:1: error: cycle in class hierarchy: T", + "interface T extends T {}", + " ^", }, }, { @@ -768,7 +783,7 @@ public class BinderErrorTest { "@interface Test {}", }, { - "<>:3: error: missing required annotation argument: value", + "<>:3: error: missing required annotation argument: value", // "@Retention", "^", }, @@ -958,6 +973,40 @@ public class BinderErrorTest { " ^", }, }, + { + { + "class C {}", // + "interface I {}", + "class A extends I implements C {}", + "interface B extends C {}", + }, + { + "<>:3: error: unexpected interface type", + "class A extends I implements C {}", + " ^", + "<>:3: error: expected interface type", + "class A extends I implements C {}", + " ^", + "<>:4: error: expected interface type", + "interface B extends C {}", + " ^", + }, + }, + { + { + "class T<X, X> {", // + " <Y, Y> void f() {}", + "}", + }, + { + "<>:1: error: duplicate declaration of X", + "class T<X, X> {", + " ^", + "<>:2: error: duplicate declaration of Y", + " <Y, Y> void f() {}", + " ^", + }, + }, }; return Arrays.asList((Object[][]) testCases); } |