From fac735a4195a6df8d526dde4051f352bb4d2939b Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Fri, 11 May 2012 15:49:59 +0400 Subject: [PATCH] Fixed compilation for new projects The problem was: IDEA passes a DummyCompilerContext, whose project is null As a result, a freshly created "Hello, world" didn't run (failed with NoClassDefFound, because the compiler didn't emit any code) --- idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java b/idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java index 5b903fc9279..c66cdc96710 100644 --- a/idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java +++ b/idea/src/org/jetbrains/jet/plugin/compiler/JetCompiler.java @@ -62,7 +62,7 @@ public class JetCompiler implements TranslatingCompiler { return false; } Project project = compileContext.getProject(); - if (project == null || JsModuleDetector.isJsProject(project)) { + if (project != null && JsModuleDetector.isJsProject(project)) { return false; } return true;