Create new trace before each resolve (to avoid writing to a trace already filled in by previous analysis)
This commit is contained in:
@@ -33,6 +33,7 @@ import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.CliLightClassGenerationSupport;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment;
|
||||
import org.jetbrains.jet.codegen.forTestCompile.ForTestCompileRuntime;
|
||||
import org.jetbrains.jet.codegen.forTestCompile.ForTestPackJdkAnnotations;
|
||||
@@ -333,6 +334,11 @@ public class JetTestUtils {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
public static void newTrace(@NotNull JetCoreEnvironment environment) {
|
||||
// let the next analysis use another trace
|
||||
CliLightClassGenerationSupport.getInstanceForCli(environment.getProject()).newBindingTrace();
|
||||
}
|
||||
|
||||
public interface TestFileFactory<F> {
|
||||
F create(String fileName, String text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user