incorporating Sveta's patch on VariableAsFunctionResolvedCall
This commit is contained in:
@@ -71,4 +71,9 @@ public class ExtensionFunctionsTest extends CodegenTestCase {
|
||||
createEnvironmentWithFullJdk();
|
||||
blackBoxFile("regressions/kt865.jet");
|
||||
}
|
||||
|
||||
public void testKtNested2() throws Exception {
|
||||
createEnvironmentWithMockJdk(CompilerSpecialMode.BUILTINS);
|
||||
blackBoxFile("extensionFunctions/nested2.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.intellij.openapi.vfs.local.CoreLocalFileSystem;
|
||||
import gnu.trove.THashSet;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestResult;
|
||||
import junit.framework.TestSuite;
|
||||
import org.jetbrains.jet.codegen.forTestCompile.ForTestCompileRuntime;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.K2JVMCompileEnvironmentConfiguration;
|
||||
@@ -126,6 +127,19 @@ public class TestlibTest extends CodegenTestCase {
|
||||
suite.addTestSuite(aClass);
|
||||
}
|
||||
}
|
||||
catch (final VerifyError e) {
|
||||
suite.addTest(new TestCase(aClass.getName()) {
|
||||
@Override
|
||||
public int countTestCases() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(TestResult result) {
|
||||
result.addError(this, new RuntimeException(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (NoSuchMethodException e) {
|
||||
}
|
||||
}
|
||||
@@ -141,7 +155,6 @@ public class TestlibTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
return suite;
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
throw e;
|
||||
} catch (Throwable e) {
|
||||
|
||||
@@ -279,10 +279,6 @@ public abstract class ExpectedResolveData {
|
||||
|
||||
|
||||
DeclarationDescriptor actualDescriptor = bindingContext.get(REFERENCE_TARGET, reference);
|
||||
if (actualDescriptor instanceof VariableAsFunctionDescriptor) {
|
||||
VariableAsFunctionDescriptor descriptor = (VariableAsFunctionDescriptor) actualDescriptor;
|
||||
actualDescriptor = descriptor.getVariableDescriptor();
|
||||
}
|
||||
|
||||
assertEquals(
|
||||
"Reference `" + name + "`" + renderReferenceInContext(reference) + " is resolved into " + actualName + ".",
|
||||
|
||||
Reference in New Issue
Block a user