langtools/test/tools/javac/api/TestResolveError.java
changeset 36526 3b41f1c69604
parent 30730 d3ce7619db2c
--- a/langtools/test/tools/javac/api/TestResolveError.java	Tue Mar 15 13:48:30 2016 -0700
+++ b/langtools/test/tools/javac/api/TestResolveError.java	Thu Mar 17 19:04:28 2016 +0000
@@ -37,6 +37,7 @@
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.type.DeclaredType;
 import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.ElementFilter;
 import javax.lang.model.util.Elements;
 import javax.lang.model.util.Types;
 import javax.tools.*;
@@ -69,7 +70,7 @@
         types = task.getTypes();
 
         Iterable<? extends TypeElement> toplevels;
-        toplevels = task.enter(task.parse());
+        toplevels = ElementFilter.typesIn(task.enter(task.parse()));
 
         for (TypeElement clazz : toplevels) {
             System.out.format("Testing %s:%n%n", clazz.getSimpleName());