Generate foreign annotation test data for FIR

This commit is contained in:
pyos
2021-07-29 15:38:53 +02:00
committed by TeamCityServer
parent 5873511f64
commit 33251f6d50
154 changed files with 9029 additions and 8 deletions
@@ -0,0 +1,25 @@
// 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,3 +1,4 @@
// FIR_IDENTICAL
// ALLOW_KOTLIN_PACKAGE
// JSPECIFY_STATE: strict
@@ -25,4 +26,4 @@ import test.Test
fun main(x: Test) {
x.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
}
}
@@ -0,0 +1,31 @@
// 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,3 +1,4 @@
// FIR_IDENTICAL
// ALLOW_KOTLIN_PACKAGE
// JSPECIFY_STATE: strict
@@ -27,4 +28,4 @@ public class Test {
// FILE: main.kt
fun main(y: test2.Test) {
y.foo(null)
}
}
@@ -0,0 +1,30 @@
// 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,3 +1,4 @@
// FIR_IDENTICAL
// ALLOW_KOTLIN_PACKAGE
// JSPECIFY_STATE: strict
@@ -41,4 +42,4 @@ import test.Test
fun main(x: Test) {
x.foo(null)
}
}
@@ -0,0 +1,25 @@
// 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)
}
@@ -0,0 +1,45 @@
// 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)
}
@@ -0,0 +1,43 @@
// 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,3 +1,4 @@
// FIR_IDENTICAL
// ALLOW_KOTLIN_PACKAGE
// JSPECIFY_STATE: strict
@@ -24,4 +25,4 @@ import test.Test
fun main(x: Test) {
x.foo(null)
}
}
@@ -0,0 +1,39 @@
// 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)
}
@@ -0,0 +1,25 @@
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
// 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)
}
@@ -0,0 +1,28 @@
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
// FILE: sandbox/test/module-info.java
import org.jspecify.nullness.NullMarked;
@NullMarked
module sandbox {
requires java9_annotations;
exports test;
}
// FILE: sandbox/test/Test.java
package test;
import org.jspecify.nullness.NullMarked;
@NullMarked
public class Test {
public void foo(Integer x) {}
}
// FILE: main.kt
import test.Test
fun main(x: Test) {
x.foo(<!NULL_FOR_NONNULL_TYPE!>null<!>)
}
@@ -0,0 +1,31 @@
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
// 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,3 +1,4 @@
// FIR_IDENTICAL
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
@@ -27,4 +28,4 @@ public class Test {
// FILE: main.kt
fun main(y: test2.Test) {
y.foo(null)
}
}
@@ -0,0 +1,30 @@
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
// 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,3 +1,4 @@
// FIR_IDENTICAL
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
@@ -41,4 +42,4 @@ import test.Test
fun main(x: Test) {
x.foo(null)
}
}
@@ -0,0 +1,25 @@
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
// 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)
}
@@ -0,0 +1,45 @@
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
// 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)
}
@@ -0,0 +1,43 @@
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
// 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,3 +1,5 @@
// FIR_IDENTICAL
// FIR_IDENTICAL
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
@@ -24,4 +26,4 @@ import test.Test
fun main(x: Test) {
x.foo(null)
}
}
@@ -0,0 +1,39 @@
// JSPECIFY_STATE: warn
// ALLOW_KOTLIN_PACKAGE
// 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)
}