Minor. ScriptNameUtil works on scripts, not files

This commit is contained in:
Andrey Breslav
2014-03-28 21:23:37 +04:00
parent caa80a0552
commit d909a03453
6 changed files with 9 additions and 6 deletions
@@ -235,7 +235,7 @@ public class KotlinToJVMBytecodeCompiler {
}, AllModules.class.getClassLoader())
);
FqName nameForScript = ScriptNameUtil.classNameForScript(environment.getSourceFiles().get(0));
FqName nameForScript = ScriptNameUtil.classNameForScript(environment.getSourceFiles().get(0).getScript());
return classLoader.loadClass(nameForScript.asString());
}
catch (Exception e) {