diff --git a/java/com/google/turbine/processing/TurbineElement.java b/java/com/google/turbine/processing/TurbineElement.java index 7824d562..95f0f424 100644 --- a/java/com/google/turbine/processing/TurbineElement.java +++ b/java/com/google/turbine/processing/TurbineElement.java @@ -263,6 +263,7 @@ public TypeMirror get() { switch (info.kind()) { case CLASS: case ENUM: + case RECORD: if (info.superclass() != null) { return factory.asTypeMirror(info.superClassType()); } @@ -283,8 +284,6 @@ public TypeMirror get() { case INTERFACE: case ANNOTATION: return factory.noType(); - case RECORD: - // TODO(b/200222393): add support for records } throw new AssertionError(info.kind()); } diff --git a/javatests/com/google/turbine/processing/ProcessingIntegrationTest.java b/javatests/com/google/turbine/processing/ProcessingIntegrationTest.java index d5c281e4..29871fd9 100644 --- a/javatests/com/google/turbine/processing/ProcessingIntegrationTest.java +++ b/javatests/com/google/turbine/processing/ProcessingIntegrationTest.java @@ -626,7 +626,11 @@ public SourceVersion getSupportedSourceVersion() { @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { for (Element e : roundEnv.getRootElements()) { - processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getKind() + " " + e); + processingEnv + .getMessager() + .printMessage( + Diagnostic.Kind.ERROR, + e.getKind() + " " + e + " " + ((TypeElement) e).getSuperclass()); for (Element m : e.getEnclosedElements()) { processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, m.getKind() + " " + m); } @@ -661,7 +665,7 @@ public void recordProcessing() throws IOException { .filter(d -> d.severity().equals(Diagnostic.Kind.ERROR)) .map(d -> d.message())) .containsExactly( - "RECORD R", + "RECORD R java.lang.Record", "RECORD_COMPONENT x", "RECORD_COMPONENT y", "CONSTRUCTOR R(T,int[])",