Fix compiler

This commit is contained in:
Pavel Talanov
2012-04-26 14:46:04 +04:00
committed by Nikolay Krasko
parent 800f289ba3
commit d8f603b3e0
@@ -327,7 +327,7 @@ public class JetCompiler implements TranslatingCompiler {
try {
String compilerClassName = "org.jetbrains.jet.cli.jvm.K2JVMCompiler";
Class<?> kompiler = Class.forName(compilerClassName, true, loader);
Method exec = kompiler.getDeclaredMethod("exec", PrintStream.class, String[].class);
Method exec = kompiler.getMethod("exec", PrintStream.class, String[].class);
String[] arguments = commandLineArguments(outputDir, scriptFile);
@@ -337,7 +337,7 @@ public class JetCompiler implements TranslatingCompiler {
Object rc = exec.invoke(kompiler.newInstance(), out, arguments);
// exec() returns a K2JVMCompiler.ExitCode object, that class is not accessible here,
// so we take it's contents through reflection
if ("org.jetbrains.jet.cli.jvm.K2JVMCompiler.ExitCode".equals(rc.getClass().getCanonicalName())) {
if ("org.jetbrains.jet.cli.common.ExitCode".equals(rc.getClass().getCanonicalName())) {
return (Integer) rc.getClass().getMethod("getCode").invoke(rc);
}
else {