diff options
author | cushon <cushon@google.com> | 2018-09-04 11:10:20 -0700 |
---|---|---|
committer | Liam Miller-Cushon <cushon@google.com> | 2018-09-09 16:48:56 -0700 |
commit | b5ca7dbddc8d13bfaf4f5e7330f525841b00aa4f (patch) | |
tree | b0d94db4c6374d7fdd0d92ac45aa2202de59d9c6 /javatests | |
parent | 7c2c7fbb8ae1fd213d43ca6cab7dcf5500bc70ea (diff) | |
download | turbine-b5ca7dbddc8d13bfaf4f5e7330f525841b00aa4f.tar.gz |
Handle assignment expression parse errors
instead of propagating a null RHS and crashing during const expr
evaluation.
MOE_MIGRATED_REVID=211488577
Diffstat (limited to 'javatests')
-rw-r--r-- | javatests/com/google/turbine/binder/BinderErrorTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/javatests/com/google/turbine/binder/BinderErrorTest.java b/javatests/com/google/turbine/binder/BinderErrorTest.java index 403c65a..e49c5cc 100644 --- a/javatests/com/google/turbine/binder/BinderErrorTest.java +++ b/javatests/com/google/turbine/binder/BinderErrorTest.java @@ -429,6 +429,18 @@ public class BinderErrorTest { " ^", }, }, + { + { + "@interface Anno { int foo() default 0; }", // + "@Anno(foo = Foo.)", + "class Foo {}", + }, + { + "<>:2: error: invalid annotation argument", // + "@Anno(foo = Foo.)", + " ^", + }, + }, }; return Arrays.asList((Object[][]) testCases); } |