aboutsummaryrefslogtreecommitdiff
path: root/java/com/google/turbine/diag/TurbineError.java
diff options
context:
space:
mode:
authorcushon <cushon@google.com>2017-03-07 16:26:15 -0800
committerLiam Miller-Cushon <cushon@google.com>2017-03-09 18:09:19 -0800
commit47b6b617f273c2a2afb1383c9bf9169a17fb5295 (patch)
tree601dc071c3c2d7f7f84480a689f35eea1b553ff6 /java/com/google/turbine/diag/TurbineError.java
parent380bc49f5e970358308acc8dc9e0f60b8cd5bcdf (diff)
downloadturbine-47b6b617f273c2a2afb1383c9bf9169a17fb5295.tar.gz
Support non-canonical static type imports
The JLS permits static type imports to refer to types using non-canonical names, e.g. `java.util.Map.Entry` can be resolved from either of these imports: import static java.util.HashMap.Entry; import static java.util.HashMap.*; Historically this feature has not been well-supported by javac [1][2][3][4], it is bad style [5][6], and a vanishingly small amount of real world code uses it. Nevertherless, it's in the spec. [1] https://bugs.openjdk.java.net/browse/JDK-8056066 [2] https://bugs.openjdk.java.net/browse/JDK-8148131 [3] https://bugs.openjdk.java.net/browse/JDK-8075274 [4] https://bugs.openjdk.java.net/browse/JDK-6863462 [5] https://google.github.io/styleguide/javaguide.html#s3.3.4-import-class-not-static [6] https://google.github.io/styleguide/javaguide.html#s3.3.1-wildcard-imports MOE_MIGRATED_REVID=149482043
Diffstat (limited to 'java/com/google/turbine/diag/TurbineError.java')
-rw-r--r--java/com/google/turbine/diag/TurbineError.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/com/google/turbine/diag/TurbineError.java b/java/com/google/turbine/diag/TurbineError.java
index bd9fd09..ee5f870 100644
--- a/java/com/google/turbine/diag/TurbineError.java
+++ b/java/com/google/turbine/diag/TurbineError.java
@@ -36,7 +36,8 @@ public class TurbineError extends Error {
UNEXPECTED_TOKEN("unexpected token %s"),
INVALID_ANNOTATION_ARGUMENT("invalid annotation argument"),
CANNOT_RESOLVE("cannot resolve %s"),
- EXPRESSION_ERROR("could not evaluate constant expression");
+ EXPRESSION_ERROR("could not evaluate constant expression"),
+ CYCLIC_HIERARCHY("cycle in class hierarchy: %s");
private final String message;