Added tests for compiling Java against TraitImpl and extension members.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package test;
|
||||
|
||||
class GenericArray {
|
||||
{
|
||||
TestPackage.noParam("");
|
||||
|
||||
TestPackage.param("", "");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
fun String.noParam() {
|
||||
}
|
||||
|
||||
fun String.param(p: String) {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
abstract class TraitImpl implements Trait {
|
||||
{
|
||||
Trait$$TImpl.simple(this);
|
||||
|
||||
Trait$$TImpl.generic(this, new ArrayList<String>());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
trait Trait {
|
||||
fun simple() {
|
||||
}
|
||||
|
||||
fun generic(list: List<String>) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
class GenericArray {
|
||||
{
|
||||
TestPackage.getVal_("");
|
||||
|
||||
TestPackage.getVar_("");
|
||||
TestPackage.setVar_("", "");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
val String.val_: String
|
||||
get() = ""
|
||||
|
||||
var String.var_: String
|
||||
get() = ""
|
||||
set(value) {
|
||||
}
|
||||
+15
@@ -142,6 +142,11 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
|
||||
doTest("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Extensions.kt")
|
||||
public void testExtensions() throws Exception {
|
||||
doTest("compiler/testData/compileJavaAgainstKotlin/method/Extensions.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GenericArray.kt")
|
||||
public void testGenericArray() throws Exception {
|
||||
doTest("compiler/testData/compileJavaAgainstKotlin/method/GenericArray.kt");
|
||||
@@ -207,6 +212,11 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
|
||||
doTest("compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TraitImpl.kt")
|
||||
public void testTraitImpl() throws Exception {
|
||||
doTest("compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Vararg.kt")
|
||||
public void testVararg() throws Exception {
|
||||
doTest("compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt");
|
||||
@@ -338,6 +348,11 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/compileJavaAgainstKotlin/property"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("Extensions.kt")
|
||||
public void testExtensions() throws Exception {
|
||||
doTest("compiler/testData/compileJavaAgainstKotlin/property/Extensions.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("GenericProperty.kt")
|
||||
public void testGenericProperty() throws Exception {
|
||||
doTest("compiler/testData/compileJavaAgainstKotlin/property/GenericProperty.kt");
|
||||
|
||||
Reference in New Issue
Block a user