Correctly apply SAM conversions in superclass constructor calls

#KT-5452 Fixed
This commit is contained in:
Dmitry Jemerov
2015-03-25 15:13:47 +01:00
parent da9fe7d9a9
commit 827d9d48c1
16 changed files with 117 additions and 11 deletions
@@ -27,7 +27,6 @@ import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
import org.jetbrains.kotlin.cli.jvm.compiler.JetCoreEnvironment;
import org.jetbrains.kotlin.codegen.CodegenTestCase;
import org.jetbrains.kotlin.codegen.GenerationUtils;
import org.jetbrains.kotlin.codegen.InlineTestUtil;
import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.psi.JetFile;
import org.jetbrains.kotlin.test.ConfigurationKind;
@@ -499,6 +499,24 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxCod
doTestAgainstJava(fileName);
}
@TestMetadata("localClass.kt")
public void testLocalClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt");
doTestAgainstJava(fileName);
}
@TestMetadata("localObjectConstructor.kt")
public void testLocalObjectConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt");
doTestAgainstJava(fileName);
}
@TestMetadata("localObjectConstructorWithFnValue.kt")
public void testLocalObjectConstructorWithFnValue() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt");
doTestAgainstJava(fileName);
}
@TestMetadata("nonLiteralAndLiteralRunnable.kt")
public void testNonLiteralAndLiteralRunnable() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt");
@@ -547,6 +565,12 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxCod
doTestAgainstJava(fileName);
}
@TestMetadata("superconstructorWithClosure.kt")
public void testSuperconstructorWithClosure() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt");
doTestAgainstJava(fileName);
}
@TestMetadata("typeParameterOfClass.kt")
public void testTypeParameterOfClass() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt");