FIR: load type qualifiers from module, package, and parent classes
This commit is contained in:
-25
@@ -1,25 +0,0 @@
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
// FILE: sandbox/module-info.java
|
||||
import org.jspecify.nullness.NullMarked;
|
||||
|
||||
@NullMarked
|
||||
module sandbox {
|
||||
requires java9_annotations;
|
||||
exports test;
|
||||
}
|
||||
|
||||
// FILE: sandbox/test/Test.java
|
||||
package test;
|
||||
|
||||
public class Test {
|
||||
public void foo(Integer x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import test.Test
|
||||
|
||||
fun main(x: Test) {
|
||||
x.foo(null)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
// FILE: sandbox/module-info.java
|
||||
import org.jspecify.nullness.NullMarked;
|
||||
|
||||
@NullMarked
|
||||
module sandbox {
|
||||
requires java9_annotations;
|
||||
exports test;
|
||||
}
|
||||
|
||||
// FILE: sandbox/test/package-info.java
|
||||
@NullMarked
|
||||
package test;
|
||||
|
||||
import org.jspecify.nullness.NullMarked;
|
||||
|
||||
// FILE: sandbox/test/Test.java
|
||||
package test;
|
||||
|
||||
public class Test {
|
||||
public void foo(Integer x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import test.Test
|
||||
|
||||
fun main(x: Test) {
|
||||
x.foo(null)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
// MODULE: module1
|
||||
// FILE: module1/module-info.java
|
||||
module module1 {
|
||||
}
|
||||
|
||||
// MODULE: module2(module1)
|
||||
// FILE: module2/module-info.java
|
||||
import org.jspecify.nullness.NullMarked;
|
||||
|
||||
@NullMarked
|
||||
module module2 {
|
||||
requires java9_annotations;
|
||||
requires module1;
|
||||
exports test2;
|
||||
}
|
||||
|
||||
// FILE: module2/test2/Test.java
|
||||
package test2;
|
||||
|
||||
public class Test {
|
||||
public void foo(Integer x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(y: test2.Test) {
|
||||
y.foo(null)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
// FILE: my.sand.box/module-info.java
|
||||
import org.jspecify.nullness.NullMarked;
|
||||
|
||||
@NullMarked
|
||||
open module my.sand.box {
|
||||
requires java9_annotations;
|
||||
exports my.test;
|
||||
}
|
||||
|
||||
// FILE: my.sand.box/my/test/Test.java
|
||||
package my.test;
|
||||
|
||||
public class Test {
|
||||
public void foo(Integer x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import my.test.Test
|
||||
|
||||
fun main(x: Test) {
|
||||
x.foo(null)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
// MODULE: module1
|
||||
// FILE: module1/module-info.java
|
||||
import org.jspecify.nullness.NullMarked;
|
||||
|
||||
@NullMarked
|
||||
module module1 {
|
||||
requires java9_annotations;
|
||||
exports test1;
|
||||
}
|
||||
|
||||
// FILE: module1/test1/Test1.java
|
||||
package test1;
|
||||
|
||||
public class Test1 {
|
||||
public void foo(Integer x) {}
|
||||
}
|
||||
|
||||
// MODULE: module2(module1)
|
||||
// FILE: module2/module-info.java
|
||||
module module2 {
|
||||
requires module1;
|
||||
exports test2;
|
||||
}
|
||||
|
||||
// FILE: module2/test2/Test2.java
|
||||
package test2;
|
||||
|
||||
import test1.Test1;
|
||||
|
||||
public class Test2 extends Test1 {
|
||||
public void foo2(Integer x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import test1.Test1
|
||||
import test2.Test2
|
||||
|
||||
fun main(x: Test1, y: Test2) {
|
||||
x.foo(null)
|
||||
y.foo(null)
|
||||
y.foo2(null)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
// FILE: sandbox/module-info.java
|
||||
import org.jspecify.nullness.NullMarked;
|
||||
|
||||
@NullMarked
|
||||
module sandbox {
|
||||
requires java9_annotations;
|
||||
exports test;
|
||||
}
|
||||
|
||||
// FILE: sandbox/test/Test.java
|
||||
package test;
|
||||
|
||||
public class Test {
|
||||
public static class Test2 {
|
||||
public Integer foo(Integer x) { return 1; }
|
||||
public static class Test4 {
|
||||
public Integer foo(Integer x) { return 1; }
|
||||
}
|
||||
public class Test5 {
|
||||
public Integer foo(Integer x) { return 1; }
|
||||
}
|
||||
}
|
||||
public class Test3 {
|
||||
public Integer foo(Integer x) { return 1; }
|
||||
public class Test5 {
|
||||
public Integer foo(Integer x) { return 1; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import test.Test
|
||||
|
||||
fun main(x: Test) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int..kotlin.Int?!")!>x.Test3().foo(null)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int..kotlin.Int?!")!>x.Test3().Test5().foo(null)<!>
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int..kotlin.Int?!")!>Test.Test2().foo(null)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int..kotlin.Int?!")!>Test.Test2().Test5().foo(null)<!>
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
// MODULE: module1
|
||||
// FILE: module1/module-info.java
|
||||
import org.jspecify.nullness.NullMarked;
|
||||
|
||||
@NullMarked
|
||||
module module1 {
|
||||
requires java9_annotations;
|
||||
exports test1;
|
||||
}
|
||||
|
||||
// FILE: module1/test1/Test.java
|
||||
package test1;
|
||||
|
||||
public class Test {
|
||||
public void foo(Integer x) {}
|
||||
}
|
||||
|
||||
// MODULE: module2(module1)
|
||||
// FILE: module2/module-info.java
|
||||
module module2 {
|
||||
requires module1;
|
||||
exports test2;
|
||||
}
|
||||
|
||||
// FILE: module2/test2/Test.java
|
||||
package test2;
|
||||
|
||||
public class Test {
|
||||
public void foo(Integer x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(x: test1.Test, y: test2.Test) {
|
||||
x.foo(null)
|
||||
y.foo(null)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
// JSPECIFY_STATE: strict
|
||||
|
||||
|
||||
+1
-1
@@ -21,5 +21,5 @@ public class Test {
|
||||
import test.Test
|
||||
|
||||
fun main(x: Test) {
|
||||
x.foo(null)
|
||||
x.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,5 +27,5 @@ public class Test {
|
||||
import test.Test
|
||||
|
||||
fun main(x: Test) {
|
||||
x.foo(null)
|
||||
x.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,5 +26,5 @@ public class Test {
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(y: test2.Test) {
|
||||
y.foo(null)
|
||||
y.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,5 +21,5 @@ public class Test {
|
||||
import my.test.Test
|
||||
|
||||
fun main(x: Test) {
|
||||
x.foo(null)
|
||||
x.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
}
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ import test1.Test1
|
||||
import test2.Test2
|
||||
|
||||
fun main(x: Test1, y: Test2) {
|
||||
x.foo(null)
|
||||
y.foo(null)
|
||||
x.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
y.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
y.foo2(null)
|
||||
}
|
||||
|
||||
+4
-4
@@ -35,9 +35,9 @@ public class Test {
|
||||
import test.Test
|
||||
|
||||
fun main(x: Test) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int..kotlin.Int?!")!>x.Test3().foo(null)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int..kotlin.Int?!")!>x.Test3().Test5().foo(null)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x.Test3().foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x.Test3().Test5().foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!>
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int..kotlin.Int?!")!>Test.Test2().foo(null)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int..kotlin.Int?!")!>Test.Test2().Test5().foo(null)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>Test.Test2().foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>Test.Test2().Test5().foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,6 +34,6 @@ public class Test {
|
||||
|
||||
// FILE: main.kt
|
||||
fun main(x: test1.Test, y: test2.Test) {
|
||||
x.foo(null)
|
||||
x.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
y.foo(null)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user