GenerationState is constructed with BindingContext, not full AnalyzeExhaust

This commit is contained in:
Andrey Breslav
2012-12-17 17:37:34 +04:00
parent 39b6c53ef3
commit b5aa44ae49
7 changed files with 15 additions and 15 deletions
@@ -358,7 +358,7 @@ public abstract class CodegenTestCase extends UsefulTestCase {
AnalyzingUtils.throwExceptionOnErrors(analyzeExhaust.getBindingContext());
CompilerConfiguration configuration = environment.getConfiguration();
GenerationState state = new GenerationState(
environment.getProject(), classBuilderFactory, Progress.DEAF, analyzeExhaust, files.getPsiFiles(),
environment.getProject(), classBuilderFactory, Progress.DEAF, analyzeExhaust.getBindingContext(), files.getPsiFiles(),
configuration.get(JVMConfigurationKeys.BUILTIN_TO_JAVA_TYPES_MAPPING_KEY, BuiltinToJavaTypesMapping.ENABLED),
configuration.get(JVMConfigurationKeys.GENERATE_NOT_NULL_ASSERTIONS, true),
configuration.get(JVMConfigurationKeys.GENERATE_NOT_NULL_PARAMETER_ASSERTIONS, true)
@@ -58,7 +58,7 @@ public class GenerationUtils {
@NotNull
public static GenerationState compileFilesGetGenerationState(@NotNull Project project, @NotNull AnalyzeExhaust analyzeExhaust, @NotNull List<JetFile> files) {
analyzeExhaust.throwIfError();
GenerationState state = new GenerationState(project, ClassBuilderFactories.TEST, analyzeExhaust, files);
GenerationState state = new GenerationState(project, ClassBuilderFactories.TEST, analyzeExhaust.getBindingContext(), files);
GenerationStrategy.STANDARD.compileCorrectFiles(state, CompilationErrorHandler.THROW_EXCEPTION);
return state;
}