aboutsummaryrefslogtreecommitdiff
path: root/javatests
diff options
context:
space:
mode:
authorLiam Miller-Cushon <cushon@google.com>2023-01-23 13:42:46 -0800
committerJavac Team <javac-team+copybara@google.com>2023-01-23 13:43:42 -0800
commit52699ff1ba8f358a02842b894dc10337def0e7fc (patch)
tree652a9b13be894e0f6fc89e2aa3732056fe752e47 /javatests
parentf4370dd3fd8474ea1a78ded7da0d9cd6d3f22406 (diff)
downloadturbine-52699ff1ba8f358a02842b894dc10337def0e7fc.tar.gz
Don't crash on duplicate type parameter declarations
PiperOrigin-RevId: 504070824
Diffstat (limited to 'javatests')
-rw-r--r--javatests/com/google/turbine/binder/BinderErrorTest.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/javatests/com/google/turbine/binder/BinderErrorTest.java b/javatests/com/google/turbine/binder/BinderErrorTest.java
index 6766470..1a83f0d 100644
--- a/javatests/com/google/turbine/binder/BinderErrorTest.java
+++ b/javatests/com/google/turbine/binder/BinderErrorTest.java
@@ -768,9 +768,7 @@ public class BinderErrorTest {
"@interface Test {}",
},
{
- "<>:3: error: missing required annotation argument: value",
- "@Retention",
- "^",
+ "<>:3: error: missing required annotation argument: value", "@Retention", "^",
},
},
{
@@ -958,6 +956,21 @@ public class BinderErrorTest {
" ^",
},
},
+ {
+ {
+ "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);
}