Serialization of flexible types supported
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun printStream() = System.out
|
||||
fun list() = Collections.emptyList<String>()
|
||||
fun array(a: Array<Int>) = Arrays.copyOf(a, 2)
|
||||
@@ -0,0 +1,22 @@
|
||||
import java.io.PrintStream
|
||||
import java.util.ArrayList
|
||||
import test.*
|
||||
|
||||
// To check that flexible types are loaded
|
||||
class Inv<T>
|
||||
fun <T> inv(t: T): Inv<T> = Inv<T>()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
printStream().checkError()
|
||||
val p: Inv<PrintStream> = inv(printStream())
|
||||
val p1: Inv<PrintStream?> = inv(printStream())
|
||||
|
||||
list().size()
|
||||
val l: Inv<List<String>> = inv(list())
|
||||
val l1: Inv<MutableList<String>?> = inv(list())
|
||||
|
||||
val a = array(Array<Int>(1){0})
|
||||
a[0] = 1
|
||||
val a1: Inv<Array<Int>> = inv(a)
|
||||
val a2: Inv<Array<out Int>?> = inv(a)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
//ALLOW_AST_ACCESS
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun printStream() = System.out
|
||||
fun list() = Collections.emptyList<String>()
|
||||
fun array(a: Array<Int>) = Arrays.copyOf(a, 2)
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
internal fun array(/*0*/ a: kotlin.Array<kotlin.Int>): kotlin.Array<(out) kotlin.Int!>!
|
||||
internal fun list(): kotlin.(Mutable)List<kotlin.String!>!
|
||||
internal fun printStream(): java.io.PrintStream!
|
||||
File diff suppressed because it is too large
Load Diff
+6
@@ -128,6 +128,12 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PlatformTypes.A.kt")
|
||||
public void testPlatformTypes() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PlatformTypes.A.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("PropertyReference.A.kt")
|
||||
public void testPropertyReference() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/PropertyReference.A.kt");
|
||||
|
||||
@@ -4612,6 +4612,12 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
doTestCompiledKotlin(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("platform.kt")
|
||||
public void testPlatform() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt");
|
||||
doTestCompiledKotlin(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("String.kt")
|
||||
public void testString() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt");
|
||||
|
||||
+6
@@ -2826,6 +2826,12 @@ public class LazyResolveRecursiveComparingTestGenerated extends AbstractLazyReso
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("platform.kt")
|
||||
public void testPlatform() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("String.kt")
|
||||
public void testString() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt");
|
||||
|
||||
Reference in New Issue
Block a user