properr names for scripts

This commit is contained in:
Alex Tkachman
2012-07-29 23:58:45 +03:00
parent f8391619a5
commit 7c2d394412
9 changed files with 69 additions and 12 deletions
@@ -261,7 +261,8 @@ public class KotlinToJVMBytecodeCompiler {
CompilerPathUtil.getRuntimePath().toURI().toURL()
},
parentLoader == null ? AllModules.class.getClassLoader() : parentLoader));
return classLoader.loadClass(ScriptCodegen.SCRIPT_DEFAULT_CLASS_NAME.getFqName().getFqName());
JetFile scriptFile = configuration.getEnvironment().getSourceFiles().get(0);
return classLoader.loadClass(ScriptCodegen.classNameForScript(scriptFile));
}
catch (Exception e) {
throw new RuntimeException("Failed to evaluate script: " + e, e);