New J2K: use nullable type for unknown for public declarations & prepare for mutability inference

#KT-32518 fixed
This commit is contained in:
Ilya Kirillov
2019-08-29 18:18:39 +03:00
parent 0040490daf
commit c28515be59
128 changed files with 784 additions and 609 deletions
+9 -9
View File
@@ -1,7 +1,7 @@
class Java8Class {
fun foo0(r: Function0<String>) {}
fun foo1(r: Function1<Int, String?>) {}
fun foo2(r: Function2<Int, Int, String>) {}
fun foo0(r: Function0<String?>?) {}
fun foo1(r: Function1<Int, String?>?) {}
fun foo2(r: Function2<Int?, Int?, String?>?) {}
fun helper() {}
fun foo() {
foo0 { "42" }
@@ -10,8 +10,8 @@ class Java8Class {
helper()
"42"
}
foo1 { i: Int -> "42" }
foo1 { i: Int -> "42" }
foo1 { i: Int? -> "42" }
foo1 { i: Int? -> "42" }
foo1 { i: Int ->
helper()
if (i > 1) {
@@ -19,12 +19,12 @@ class Java8Class {
}
"43"
}
foo2 { i: Int, j: Int -> "42" }
foo2 { i: Int, j: Int ->
foo2 { i: Int?, j: Int? -> "42" }
foo2 { i: Int?, j: Int? ->
helper()
"42"
}
val f = label@{ i: Int, k: Int ->
val f: Function2<Int, Int, String> = label@{ i: Int, k: Int? ->
helper()
if (i > 1) {
return@label "42"
@@ -32,7 +32,7 @@ class Java8Class {
"43"
}
val f1 = label@{ i1: Int, k1: Int ->
val f2 = label@{ i2: Int, k2: Int ->
val f2: Function2<Int, Int, String> = label@{ i2: Int, k2: Int? ->
helper()
if (i2 > 1) {
return@label "42"