diff --git a/compiler/fir/analysis-tests/testData/builtIns/kotlin-collections.txt b/compiler/fir/analysis-tests/testData/builtIns/kotlin-collections.txt index 3ea064d7994..0f7b2b05233 100644 --- a/compiler/fir/analysis-tests/testData/builtIns/kotlin-collections.txt +++ b/compiler/fir/analysis-tests/testData/builtIns/kotlin-collections.txt @@ -1,5 +1,5 @@ public/*package*/ open class ArraysUtilJVM : R|kotlin/Any| { - public/*package*/ open static fun !|> asList(p0: T[]): java.util.List + public/*package*/ open static fun !|> asList(p0: T[]): java.util.List public/*package*/ constructor(): R|kotlin/collections/ArraysUtilJVM| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/NonNullNever.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/NonNullNever.fir.txt index 69664307a80..2b7c5855fcc 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/NonNullNever.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/NonNullNever.fir.txt @@ -3,9 +3,9 @@ } public open class NonNullNever : R|kotlin/Any| { - @R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.NEVER|()) public open field field: R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.NEVER|()) public open field field: R|@EnhancedNullability kotlin/String?| - @R|MyNullable|() public open fun foo(@R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.NEVER|()) x: R|@FlexibleNullability kotlin/String?|, @R|MyNullable|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|@FlexibleNullability kotlin/String?| + @R|MyNullable|() public open fun foo(@R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.NEVER|()) x: R|@EnhancedNullability kotlin/String?|, @R|MyNullable|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|@EnhancedNullability kotlin/String?| public constructor(): R|NonNullNever| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/Simple.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/Simple.fir.txt index 4d457f18346..1e59ab8255d 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/Simple.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/Simple.fir.txt @@ -1,7 +1,7 @@ public open class Simple : R|kotlin/Any| { - @R|javax/annotation/Nullable|() public open field field: R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nullable|() public open field field: R|@EnhancedNullability kotlin/String?| - @R|javax/annotation/Nullable|() public open fun foo(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nullable|() public open fun foo(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|@EnhancedNullability kotlin/String?| @R|javax/annotation/Nonnull|() public open fun bar(): R|@EnhancedNullability kotlin/String| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/Strange.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/Strange.fir.txt index 8488d8a9c4c..19ba932753c 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/Strange.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/Strange.fir.txt @@ -1,7 +1,7 @@ public open class Strange : R|kotlin/Any| { - @R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.UNKNOWN|()) public open field field: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + @R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.UNKNOWN|()) public open field field: R|ft!| - @R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.MAYBE|()) public open fun foo(@R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.ALWAYS|()) x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.NEVER|()) y: R|@FlexibleNullability kotlin/CharSequence?|): R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.MAYBE|()) public open fun foo(@R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.ALWAYS|()) x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.NEVER|()) y: R|@EnhancedNullability kotlin/CharSequence?|): R|@EnhancedNullability kotlin/String?| @R|javax/annotation/Nonnull|() public open fun bar(): R|@EnhancedNullability kotlin/String| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/FieldsAreNullable.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/FieldsAreNullable.fir.txt index f2cde97ce47..ea26edcf306 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/FieldsAreNullable.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/FieldsAreNullable.fir.txt @@ -1,9 +1,9 @@ @R|FieldsAreNullable|() public open class A : R|kotlin/Any| { - public open field field: R|@FlexibleNullability kotlin/String?| + public open field field: R|@EnhancedNullability kotlin/String?| @R|javax/annotation/Nonnull|() public open field nonNullField: R|@EnhancedNullability kotlin/String| - public open fun foo(q: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun foo(q: R|ft!|, @R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|ft!| @R|javax/annotation/Nonnull|() public open fun bar(): R|@EnhancedNullability kotlin/String| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ForceFlexibility.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ForceFlexibility.fir.txt index 21a4a011736..19f6609f44f 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ForceFlexibility.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ForceFlexibility.fir.txt @@ -1,7 +1,7 @@ @R|spr/NonNullApi|() public open class A : R|kotlin/Any| { - public open fun foo(x: R|@FlexibleNullability kotlin/String|, @R|spr/Nullable|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|@FlexibleNullability kotlin/String| + public open fun foo(x: R|@EnhancedNullability kotlin/String|, @R|spr/Nullable|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|@EnhancedNullability kotlin/String| - @R|spr/ForceFlexibility|() public open fun bar(x: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|javax/annotation/Nonnull|() y: R|@EnhancedNullability kotlin/CharSequence|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + @R|spr/ForceFlexibility|() public open fun bar(x: R|ft!|, @R|javax/annotation/Nonnull|() y: R|@EnhancedNullability kotlin/CharSequence|): R|ft!| public constructor(): R|A| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ForceFlexibleOverOverrides.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ForceFlexibleOverOverrides.fir.txt index f8d445b6f1f..e24bdece177 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ForceFlexibleOverOverrides.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ForceFlexibleOverOverrides.fir.txt @@ -1,11 +1,11 @@ @R|spr/NonNullApi|() public open class A : R|kotlin/Any|, R|B| { - @R|spr/ForceFlexibility|() public open fun foo(x: R|@FlexibleNullability kotlin/String|): R|kotlin/Unit| + @R|spr/ForceFlexibility|() public open fun foo(x: R|@EnhancedNullability kotlin/String|): R|kotlin/Unit| - public open fun bar(@R|spr/ForceFlexibility|() x: R|@FlexibleNullability kotlin/String|): R|kotlin/Unit| + public open fun bar(@R|spr/ForceFlexibility|() x: R|@EnhancedNullability kotlin/String|): R|kotlin/Unit| - public open fun baz(@R|spr/UnknownNullability|() x: R|@FlexibleNullability kotlin/String|): R|kotlin/Unit| + public open fun baz(@R|spr/UnknownNullability|() x: R|@EnhancedNullability kotlin/String|): R|kotlin/Unit| - public open fun foobar(@R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.UNKNOWN|()) x: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit| + public open fun foobar(@R|javax/annotation/Nonnull|(R|javax/annotation/meta/When.UNKNOWN|()) x: R|ft!|): R|kotlin/Unit| public constructor(): R|A| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/NullabilityFromOverridden.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/NullabilityFromOverridden.fir.txt index 3b098a54002..02bcfd919a1 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/NullabilityFromOverridden.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/NullabilityFromOverridden.fir.txt @@ -1,55 +1,55 @@ @R|NonNullApi|() public open class A : R|kotlin/Any| { - public open fun foo1(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun foo1(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| - public open fun foo2(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun foo2(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| - public open fun foo3(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun foo3(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| - @R|javax/annotation/Nullable|() public open fun bar1(@R|javax/annotation/Nullable|() x: R|@FlexibleNullability kotlin/String?|): R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nullable|() public open fun bar1(@R|javax/annotation/Nullable|() x: R|@EnhancedNullability kotlin/String?|): R|@EnhancedNullability kotlin/String?| - @R|javax/annotation/Nullable|() public open fun bar2(@R|javax/annotation/Nullable|() x: R|@FlexibleNullability kotlin/String?|): R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nullable|() public open fun bar2(@R|javax/annotation/Nullable|() x: R|@EnhancedNullability kotlin/String?|): R|@EnhancedNullability kotlin/String?| - public open fun baz(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun baz(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| public constructor(): R|A| } @R|NonNullApi|() public abstract interface AInt : R|kotlin/Any| { - public abstract fun foo1(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/CharSequence| + public abstract fun foo1(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/CharSequence| - public abstract fun foo2(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/CharSequence| + public abstract fun foo2(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/CharSequence| - public abstract fun foo3(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/CharSequence| + public abstract fun foo3(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/CharSequence| - @R|javax/annotation/Nullable|() public abstract fun bar1(@R|javax/annotation/Nullable|() x: R|@FlexibleNullability kotlin/String?|): R|@FlexibleNullability kotlin/CharSequence?| + @R|javax/annotation/Nullable|() public abstract fun bar1(@R|javax/annotation/Nullable|() x: R|@EnhancedNullability kotlin/String?|): R|@EnhancedNullability kotlin/CharSequence?| - @R|javax/annotation/Nullable|() public abstract fun bar2(@R|javax/annotation/Nullable|() x: R|@FlexibleNullability kotlin/String?|): R|@FlexibleNullability kotlin/CharSequence?| + @R|javax/annotation/Nullable|() public abstract fun bar2(@R|javax/annotation/Nullable|() x: R|@EnhancedNullability kotlin/String?|): R|@EnhancedNullability kotlin/CharSequence?| - public abstract fun baz(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|): R|@FlexibleNullability kotlin/CharSequence| + public abstract fun baz(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/CharSequence| } @R|NullableApi|() public open class B : R|A|, R|AInt| { - public open fun foo1(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun foo1(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| @R|javax/annotation/Nonnull|() public open fun foo2(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| - public open fun bar1(x: R|@FlexibleNullability kotlin/String?|): R|@FlexibleNullability kotlin/String?| + public open fun bar1(x: R|@EnhancedNullability kotlin/String?|): R|@EnhancedNullability kotlin/String?| - public open fun baz(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun baz(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| public constructor(): R|B| } @R|NonNullApi|() public open class C : R|A|, R|AInt| { - public open fun foo1(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun foo1(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| - public open fun foo2(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun foo2(@R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| - public open fun bar1(x: R|@FlexibleNullability kotlin/String?|): R|@FlexibleNullability kotlin/String?| + public open fun bar1(x: R|@EnhancedNullability kotlin/String?|): R|@EnhancedNullability kotlin/String?| - @R|javax/annotation/Nullable|() public open fun bar2(@R|javax/annotation/Nullable|() x: R|@FlexibleNullability kotlin/String?|): R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nullable|() public open fun bar2(@R|javax/annotation/Nullable|() x: R|@EnhancedNullability kotlin/String?|): R|@EnhancedNullability kotlin/String?| - public open fun baz(x: R|@FlexibleNullability kotlin/String|): R|@FlexibleNullability kotlin/String| + public open fun baz(x: R|@EnhancedNullability kotlin/String|): R|@EnhancedNullability kotlin/String| public constructor(): R|C| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/OverridingDefaultQualifier.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/OverridingDefaultQualifier.fir.txt index fba1883e27f..081f09c7457 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/OverridingDefaultQualifier.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/OverridingDefaultQualifier.fir.txt @@ -1,13 +1,13 @@ @R|NonNullApi|() public open class A : R|kotlin/Any| { - public open field field: R|@FlexibleNullability kotlin/String| + public open field field: R|@EnhancedNullability kotlin/String| - public open fun foo(x: R|@FlexibleNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|@FlexibleNullability kotlin/String| + public open fun foo(x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|@EnhancedNullability kotlin/String| - @R|NullableApi|() public open fun foobar(x: R|@FlexibleNullability kotlin/String?|, @R|NonNullApi|() y: R|@FlexibleNullability kotlin/CharSequence|): R|@FlexibleNullability kotlin/String?| + @R|NullableApi|() public open fun foobar(x: R|@EnhancedNullability kotlin/String?|, @R|NonNullApi|() y: R|@EnhancedNullability kotlin/CharSequence|): R|@EnhancedNullability kotlin/String?| - public open fun bar(): R|@FlexibleNullability kotlin/String| + public open fun bar(): R|@EnhancedNullability kotlin/String| - @R|javax/annotation/Nullable|() public open fun baz(): R|ft<@FlexibleNullability kotlin/collections/MutableList!>?, kotlin/collections/List!>?>?| + @R|javax/annotation/Nullable|() public open fun baz(): R|ft<@EnhancedNullability kotlin/collections/MutableList!>?, @EnhancedNullability kotlin/collections/List!>?>?| public constructor(): R|A| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ParametersAreNonnullByDefault.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ParametersAreNonnullByDefault.fir.txt index c5f7d7e6690..86f8ac894f4 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ParametersAreNonnullByDefault.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ParametersAreNonnullByDefault.fir.txt @@ -1,7 +1,7 @@ @R|javax/annotation/ParametersAreNonnullByDefault|() public open class A : R|kotlin/Any| { - @R|javax/annotation/Nullable|() public open field field: R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nullable|() public open field field: R|@EnhancedNullability kotlin/String?| - public open fun foo(q: R|@FlexibleNullability kotlin/String|, @R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun foo(q: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|ft!| @R|javax/annotation/Nonnull|() public open fun bar(): R|@EnhancedNullability kotlin/String| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ParametersAreNonnullByDefaultPackage.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ParametersAreNonnullByDefaultPackage.fir.txt index 7d4ed3a7e23..31058113c9e 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ParametersAreNonnullByDefaultPackage.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/ParametersAreNonnullByDefaultPackage.fir.txt @@ -1,7 +1,7 @@ public open class A : R|kotlin/Any| { - @R|javax/annotation/Nullable|() public open field field: R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nullable|() public open field field: R|@EnhancedNullability kotlin/String?| - public open fun foo(q: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun foo(q: R|ft!|, @R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|ft!| @R|javax/annotation/Nonnull|() public open fun bar(): R|@EnhancedNullability kotlin/String| @@ -9,9 +9,9 @@ public open class A : R|kotlin/Any| { } public open class A2 : R|kotlin/Any| { - @R|javax/annotation/Nullable|() public open field field: R|@FlexibleNullability kotlin/String?| + @R|javax/annotation/Nullable|() public open field field: R|@EnhancedNullability kotlin/String?| - public open fun foo(q: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun foo(q: R|ft!|, @R|javax/annotation/Nonnull|() x: R|@EnhancedNullability kotlin/String|, @R|javax/annotation/CheckForNull|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|ft!| @R|javax/annotation/Nonnull|() public open fun bar(): R|@EnhancedNullability kotlin/String| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/SpringNullable.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/SpringNullable.fir.txt index 05de5093d12..dbd34e15d79 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/SpringNullable.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/SpringNullable.fir.txt @@ -1,11 +1,11 @@ @R|spr/NonNullApi|() public open class A : R|kotlin/Any| { - public open field field: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open field field: R|ft!| - public open fun foo(x: R|@FlexibleNullability kotlin/String|, @R|spr/Nullable|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|@FlexibleNullability kotlin/String| + public open fun foo(x: R|@EnhancedNullability kotlin/String|, @R|spr/Nullable|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|@EnhancedNullability kotlin/String| - public open fun bar(): R|@FlexibleNullability kotlin/String| + public open fun bar(): R|@EnhancedNullability kotlin/String| - @R|spr/Nullable|() public open fun baz(): R|ft<@FlexibleNullability kotlin/collections/MutableList!>?, kotlin/collections/List!>?>?| + @R|spr/Nullable|() public open fun baz(): R|ft<@EnhancedNullability kotlin/collections/MutableList!>?, @EnhancedNullability kotlin/collections/List!>?>?| public constructor(): R|A| diff --git a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/SpringNullablePackage.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/SpringNullablePackage.fir.txt index dab4e6f8265..6391110a2fe 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/SpringNullablePackage.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/jsr305/typeQualifierDefault/SpringNullablePackage.fir.txt @@ -1,11 +1,11 @@ public open class A : R|kotlin/Any| { - public open field field: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open field field: R|ft!| - public open fun foo(x: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|spr/Nullable|() y: R|@FlexibleNullability kotlin/CharSequence?|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun foo(x: R|ft!|, @R|spr/Nullable|() y: R|@EnhancedNullability kotlin/CharSequence?|): R|ft!| - public open fun bar(): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun bar(): R|ft!| - @R|spr/Nullable|() public open fun baz(): R|ft<@FlexibleNullability kotlin/collections/MutableList!>?, kotlin/collections/List!>?>?| + @R|spr/Nullable|() public open fun baz(): R|ft<@EnhancedNullability kotlin/collections/MutableList!>?, @EnhancedNullability kotlin/collections/List!>?>?| public constructor(): R|test/A| diff --git a/compiler/fir/analysis-tests/testData/enhancement/mapping/AbstractMap.fir.txt b/compiler/fir/analysis-tests/testData/enhancement/mapping/AbstractMap.fir.txt index e998133e4e1..be553283c51 100644 --- a/compiler/fir/analysis-tests/testData/enhancement/mapping/AbstractMap.fir.txt +++ b/compiler/fir/analysis-tests/testData/enhancement/mapping/AbstractMap.fir.txt @@ -1,4 +1,4 @@ -public abstract class AbstractMap : R|kotlin/Any|, R|kotlin/collections/MutableMap!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>| { +public abstract class AbstractMap : R|kotlin/Any|, R|kotlin/collections/MutableMap!, ft!>| { public constructor(): R|AbstractMap| } diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndFlexibleType.fir.txt b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndFlexibleType.fir.txt index 2608d92bed6..9e39732060b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndFlexibleType.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndFlexibleType.fir.txt @@ -15,7 +15,7 @@ FILE: main.kt } public final fun test_1(): R|kotlin/Unit| { - lval e: R|ft<@FlexibleNullability E, E?>!| = Q|Utils|.R|/Utils.getEnum|() + lval e: R|ft!| = Q|Utils|.R|/Utils.getEnum|() lval s: R|kotlin/String| = when (R|/e|) { ==($subj$, Null(null)) -> { ^test_1 Unit @@ -34,7 +34,7 @@ FILE: main.kt R|/s|.R|kotlin/String.length| } public final fun test_2(): R|kotlin/Unit| { - lval e: R|ft<@FlexibleNullability E, E?>!| = Q|Utils|.R|/Utils.getEnum|() + lval e: R|ft!| = Q|Utils|.R|/Utils.getEnum|() lval s: R|kotlin/String| = when (R|/e|) { ==($subj$, Q|E|.R|/E.A|) -> { String() diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/genericDiagnostic.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/genericDiagnostic.fir.txt index 5fbd7f0c474..5e723192c7e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/genericDiagnostic.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/genericDiagnostic.fir.txt @@ -16,7 +16,7 @@ FILE: test.kt private final val DERIVED_FACTORY: R|DiagnosticFactory0!>| = R|/DiagnosticFactory0.DiagnosticFactory0|!|>() private get(): R|DiagnosticFactory0!>| public final fun createViaFactory(d: R|EmptyDiagnostic|): R|kotlin/Unit| { - lval casted: R|@FlexibleNullability Diagnostic!>| = R|/DERIVED_FACTORY|.R|SubstitutionOverride!>|>|(R|/d|) + lval casted: R|Diagnostic!>| = R|/DERIVED_FACTORY|.R|SubstitutionOverride!>|>|(R|/d|) lval element: R|DerivedElement| = R|/casted|.R|/Diagnostic.element| R|/Fix.Fix|(R|/element|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/javaFieldCallable.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/javaFieldCallable.fir.txt index 9245e6a1512..2ffa96454fd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/javaFieldCallable.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/javaFieldCallable.fir.txt @@ -1,5 +1,5 @@ FILE: test.kt public final fun test(): R|kotlin/Unit| { - lval staticReference: R|kotlin/reflect/KMutableProperty0!>| = Q|JavaClass|::R|/JavaClass.staticField| - lval nonStaticReference: R|kotlin/reflect/KMutableProperty1!>| = Q|JavaClass|::R|/JavaClass.nonStaticField| + lval staticReference: R|kotlin/reflect/KMutableProperty0!>| = Q|JavaClass|::R|/JavaClass.staticField| + lval nonStaticReference: R|kotlin/reflect/KMutableProperty1!>| = Q|JavaClass|::R|/JavaClass.nonStaticField| } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/outerMemberAccesses.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/outerMemberAccesses.fir.txt index 0dcfc0f5422..6840cf1e02e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/outerMemberAccesses.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/outerMemberAccesses.fir.txt @@ -37,7 +37,7 @@ FILE: O.kt } public final fun local(): R|kotlin/Unit| { - lval y: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = this@R|/O.Derived|.R|/Base.foo|() + lval y: R|ft!| = this@R|/O.Derived|.R|/Base.foo|() } public final val oo: R|| = object : R|kotlin/Any| { @@ -66,7 +66,7 @@ FILE: O.kt } public final fun local(): R|kotlin/Unit| { - lval y: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = this@R|/O.Derived|.R|/Base.foo|() + lval y: R|ft!| = this@R|/O.Derived|.R|/Base.foo|() } } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/syntheticSmartCast.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/syntheticSmartCast.fir.txt index 610f43dbe2d..cdae761ca29 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/syntheticSmartCast.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/syntheticSmartCast.fir.txt @@ -20,7 +20,7 @@ FILE: test.kt R|/x|.R|/AnotherClass.bar| } public final fun test2(x: R|SomeClass?|): R|kotlin/Unit| { - lval bar: R|@FlexibleNullability kotlin/CharSequence| = R|/x|?.{ $subj$.R|/SomeClass.bar| } ?: ^test2 Unit + lval bar: R|kotlin/CharSequence| = R|/x|?.{ $subj$.R|/SomeClass.bar| } ?: ^test2 Unit R|/x|.R|/SomeClass.bar| } public final fun test3(x: R|AnotherClass?|): R|kotlin/Unit| { @@ -33,7 +33,7 @@ FILE: test.kt } public final fun test4(x: R|SomeClass?|): R|kotlin/Unit| { - lval bar: R|@FlexibleNullability kotlin/CharSequence?| = R|/x|?.{ $subj$.R|/SomeClass.bar| } + lval bar: R|kotlin/CharSequence?| = R|/x|?.{ $subj$.R|/SomeClass.bar| } when () { !=(R|/bar|, Null(null)) -> { R|/x|.R|/SomeClass.bar|.# diff --git a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment/flexibleTypeBug.fir.txt b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment/flexibleTypeBug.fir.txt index c298e4ac41a..9ad108acef4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment/flexibleTypeBug.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment/flexibleTypeBug.fir.txt @@ -1,6 +1,6 @@ FILE: flexibleTypeBug.kt public final fun foo(): R|kotlin/Unit| { - lvar list1: R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!| = Q|java/util/Collections|.R|java/util/Collections.emptyList|!|>() + lvar list1: R|ft!>, kotlin/collections/List!>?>!| = Q|java/util/Collections|.R|java/util/Collections.emptyList|!|>() lval list2: R|kotlin/collections/List| = R|kotlin/collections/listOf|(String(b)) R|/list1| = R|/list1|.R|kotlin/collections/plus|!|>(R|/list2|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/capturedTypeForJavaTypeParameter.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/capturedTypeForJavaTypeParameter.fir.txt index a9624fb2e6a..ddfbabd241b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/capturedTypeForJavaTypeParameter.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/capturedTypeForJavaTypeParameter.fir.txt @@ -4,5 +4,5 @@ FILE: main.kt public final fun foo(b: R|B|): R|kotlin/Unit| { } public final fun main(b: R|B<*>|): R|kotlin/Unit| { - R|/foo|!|>(R|/b|) + R|/foo|!|>(R|/b|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/javaFieldVsAccessor.fir.txt b/compiler/fir/analysis-tests/testData/resolve/javaFieldVsAccessor.fir.txt index 6482843e933..261a6dbb0d6 100644 --- a/compiler/fir/analysis-tests/testData/resolve/javaFieldVsAccessor.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/javaFieldVsAccessor.fir.txt @@ -1,5 +1,5 @@ FILE: main.kt public final fun test(a: R|A|): R|kotlin/Unit| { lval int: R|kotlin/Int| = R|/a|.R|/A.x| - lval string: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/a|.R|/A.getX|() + lval string: R|ft!| = R|/a|.R|/A.getX|() } diff --git a/compiler/fir/analysis-tests/testData/resolve/javaStaticScopeInheritance.fir.txt b/compiler/fir/analysis-tests/testData/resolve/javaStaticScopeInheritance.fir.txt index 5d6b59f7be2..242b737e00b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/javaStaticScopeInheritance.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/javaStaticScopeInheritance.fir.txt @@ -1,4 +1,4 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { - lval b: R|ft<@FlexibleNullability B, B?>!| = Q|B|.R|/B.VALUE| + lval b: R|ft!| = Q|B|.R|/B.VALUE| } diff --git a/compiler/fir/analysis-tests/testData/resolve/properties/javaAccessorConversion.fir.txt b/compiler/fir/analysis-tests/testData/resolve/properties/javaAccessorConversion.fir.txt index 30060d84ced..74283bc868c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/properties/javaAccessorConversion.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/properties/javaAccessorConversion.fir.txt @@ -1,10 +1,10 @@ FILE: main.kt public final fun test_1(x: R|A|): R|kotlin/Unit| { - lval str1: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/x|.R|/A.vmParameters| + lval str1: R|ft!| = R|/x|.R|/A.vmParameters| lval str2: R|ERROR CLASS: Unresolved name: vMParameters| = R|/x|.# } public final fun test_2(x: R|B|): R|kotlin/Unit| { - lval int: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| = R|/x|.R|/B.vmParameters| + lval int: R|ft!| = R|/x|.R|/B.vmParameters| lval error: R|ERROR CLASS: Unresolved name: vMParameters| = R|/x|.# } public final fun test_3(x: R|C|): R|kotlin/Unit| { diff --git a/compiler/fir/analysis-tests/testData/resolve/rawTypeSam.fir.txt b/compiler/fir/analysis-tests/testData/resolve/rawTypeSam.fir.txt index 3f45b125029..e06e80d4aa7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/rawTypeSam.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/rawTypeSam.fir.txt @@ -1,6 +1,6 @@ FILE: main.kt public final fun foo(): R|kotlin/Unit| { - Q|RawType|.R|/RawType.bar|( = bar@fun (it: R|ft<@FlexibleNullability kotlin/CharSequence, @FlexibleNullability kotlin/CharSequence?>!|): R|kotlin/Boolean| { + Q|RawType|.R|/RawType.bar|( = bar@fun (it: R|ft!|): R|kotlin/Boolean| { ^ CMP(>, R|/it|.R|kotlin/CharSequence.length|.R|kotlin/Int.compareTo|(Int(0))) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.fir.txt index 65d8458fb85..c7a7a81700f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.fir.txt @@ -1,14 +1,14 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { - Q|JavaUsage|.R|/JavaUsage.foo1|( = foo1@fun (x: R|ft<@FlexibleNullability kotlin/Int, @FlexibleNullability kotlin/Int?>!|): R|ft<@FlexibleNullability kotlin/String, @FlexibleNullability kotlin/String?>!| { + Q|JavaUsage|.R|/JavaUsage.foo1|( = foo1@fun (x: R|ft!|): R|ft!| { ^ R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() } ) - Q|JavaUsage|.R|/JavaUsage.foo2|( = foo2@fun (x: R|ft<@FlexibleNullability kotlin/Number, @FlexibleNullability kotlin/Number?>!|): R|ft<@FlexibleNullability kotlin/CharSequence, @FlexibleNullability kotlin/CharSequence?>!| { + Q|JavaUsage|.R|/JavaUsage.foo2|( = foo2@fun (x: R|ft!|): R|ft!| { ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } ) - Q|JavaUsage|.#( = foo2@fun (x: R|kotlin/Int|): R|ft<@FlexibleNullability kotlin/CharSequence, @FlexibleNullability kotlin/CharSequence?>!| { + Q|JavaUsage|.#( = foo2@fun (x: R|kotlin/Int|): R|ft!| { ^ R|/x|.R|kotlin/Any.toString|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.fir.txt index 2cfa6ec3e37..b3cda246e11 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.fir.txt @@ -2,11 +2,11 @@ FILE: main.kt public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|ft<@FlexibleNullability kotlin/Boolean, kotlin/Boolean?>!| { + Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|ft!| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } ) - Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|ft<@FlexibleNullability kotlin/Boolean, kotlin/Boolean?>!| { + Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|ft!| { ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(1))) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/samWithEquals.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/samWithEquals.fir.txt index 3cd01d2b6ea..a6d69638131 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/samWithEquals.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/samWithEquals.fir.txt @@ -5,7 +5,7 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { - Q|OverridingUtil|.R|/OverridingUtil.createWithEqualityAxioms|( = l1@fun (c1: R|ft<@FlexibleNullability TypeConstructor, TypeConstructor?>!|, c2: R|ft<@FlexibleNullability TypeConstructor, TypeConstructor?>!|): R|kotlin/Boolean| { + Q|OverridingUtil|.R|/OverridingUtil.createWithEqualityAxioms|( = l1@fun (c1: R|ft!|, c2: R|ft!|): R|kotlin/Boolean| { when () { ==(R|/c1|.R|/TypeConstructor.x|, R|/c2|.R|/TypeConstructor.x|) -> { ^@l1 Boolean(true) diff --git a/compiler/fir/analysis-tests/testData/resolve/spreadOperator.fir.txt b/compiler/fir/analysis-tests/testData/resolve/spreadOperator.fir.txt index 307f214df0d..196fc39dbae 100644 --- a/compiler/fir/analysis-tests/testData/resolve/spreadOperator.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/spreadOperator.fir.txt @@ -16,7 +16,7 @@ FILE: Main.kt R|/takeStrings|(R|/list|) } public final fun testFromJava(): R|kotlin/Unit| { - lval values: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!| = Q|Utils|.R|/Utils.getStrings|() - lval list: R|kotlin/collections/List!>| = R|/myListOf|!|>(vararg(*R|/values|)) + lval values: R|ft!>, kotlin/Array!>?>!| = Q|Utils|.R|/Utils.getStrings|() + lval list: R|kotlin/collections/List!>| = R|/myListOf|!|>(vararg(*R|/values|)) R|/takeStrings|(R|/list|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/stdlib/j+k/ArrayInGenericArguments.fir.txt b/compiler/fir/analysis-tests/testData/resolve/stdlib/j+k/ArrayInGenericArguments.fir.txt index f18dc2a03e0..605b27477c0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/stdlib/j+k/ArrayInGenericArguments.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/stdlib/j+k/ArrayInGenericArguments.fir.txt @@ -1,5 +1,5 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { - Q|Keys|.R|/Keys.getData|!>, kotlin/Array!>?>!|>(Q|Keys|.R|/Keys.X|).R|SubstitutionOverride!|>|(Int(0)).R|kotlin/String.length| - Q|Keys|.R|/Keys.getData|!|>(Q|Keys|.R|/Keys.Y|).R|kotlin/String.length| + Q|Keys|.R|/Keys.getData|!>, kotlin/Array!>?>!|>(Q|Keys|.R|/Keys.X|).R|SubstitutionOverride!|>|(Int(0)).R|kotlin/String.length| + Q|Keys|.R|/Keys.getData|!|>(Q|Keys|.R|/Keys.Y|).R|kotlin/String.length| } diff --git a/compiler/fir/analysis-tests/testData/resolve/stdlib/j+k/flexibleWildcard.fir.txt b/compiler/fir/analysis-tests/testData/resolve/stdlib/j+k/flexibleWildcard.fir.txt index d2149970776..8a458e211f8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/stdlib/j+k/flexibleWildcard.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/stdlib/j+k/flexibleWildcard.fir.txt @@ -1,5 +1,5 @@ FILE: main.kt public final fun main(x: R|kotlin/collections/MutableCollection>|): R|kotlin/Unit| { - lval y: R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!| = Q|ContainerUtil|.R|/ContainerUtil.flatten|!|>(R|/x|) + lval y: R|ft!>, kotlin/collections/List!>?>!| = Q|ContainerUtil|.R|/ContainerUtil.flatten|!|>(R|/x|) R|/y|.R|SubstitutionOverride!|>|(Int(0)).R|kotlin/String.length| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/referenceToJavaStdlib.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/referenceToJavaStdlib.fir.txt index aca23b12b77..3c86f71ddf9 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/referenceToJavaStdlib.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/referenceToJavaStdlib.fir.txt @@ -1,6 +1,6 @@ FILE: referenceToJavaStdlib.kt public final fun detectDirsWithTestsMapFileOnly(file: R|java/io/File|): R|kotlin/collections/List| { - Q|java/nio/file/Files|.R|java/nio/file/Files.walk|(R|/file|.R|java/io/File.toPath|()).R|SubstitutionOverride!>, java/util/stream/Stream!>?>!|>|(Q|java/nio/file/Files|::R|java/nio/file/Files.isRegularFile|) + Q|java/nio/file/Files|.R|java/nio/file/Files.walk|(R|/file|.R|java/io/File.toPath|()).R|SubstitutionOverride!>, java/util/stream/Stream!>?>!|>|(Q|java/nio/file/Files|::R|java/nio/file/Files.isRegularFile|) } public abstract interface A : R|kotlin/Any| { } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/flexibleTypeInSystem.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/flexibleTypeInSystem.fir.txt index c7e4f338927..3e15c6ad343 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/flexibleTypeInSystem.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/flexibleTypeInSystem.fir.txt @@ -1,3 +1,3 @@ FILE: main.kt - public final val enumMap: R|java/util/EnumMap!, ft!>| = R|java/util/EnumMap.EnumMap|!|, R|ft!|>(R|kotlin/collections/mapOf|!|, R|kotlin/String|>(Q|JavaEnum|.R|/JavaEnum.A|.R|kotlin/to|(String(A)))) - public get(): R|java/util/EnumMap!, ft!>| + public final val enumMap: R|java/util/EnumMap!, ft!>| = R|java/util/EnumMap.EnumMap|!|, R|ft!|>(R|kotlin/collections/mapOf|!|, R|kotlin/String|>(Q|JavaEnum|.R|/JavaEnum.A|.R|kotlin/to|(String(A)))) + public get(): R|java/util/EnumMap!, ft!>| diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/BasicWithAnnotatedOverriddenJava.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/BasicWithAnnotatedOverriddenJava.fir.txt index a4c1c4407b2..fd3000d39f7 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/BasicWithAnnotatedOverriddenJava.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/BasicWithAnnotatedOverriddenJava.fir.txt @@ -5,8 +5,8 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - lval x: R|@FlexibleNullability kotlin/String| = this@R|/User|.R|/AnnotatedDerived.foo|(String(123)) - lval y: R|@FlexibleNullability kotlin/String| = this@R|/User|.R|/AnnotatedDerived.foo|(Null(null)) + lval x: R|kotlin/String| = this@R|/User|.R|/AnnotatedDerived.foo|(String(123)) + lval y: R|kotlin/String| = this@R|/User|.R|/AnnotatedDerived.foo|(Null(null)) } } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/BasicWithPrimitiveJava.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/BasicWithPrimitiveJava.fir.txt index fc3cb28c590..ed62ac94baf 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/BasicWithPrimitiveJava.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/BasicWithPrimitiveJava.fir.txt @@ -7,7 +7,7 @@ FILE: jvm.kt public final fun test(): R|kotlin/Unit| { lval res1: R|kotlin/Boolean| = this@R|/A|.R|/Some.foo|(Int(1)) lval res2: R|kotlin/Boolean| = this@R|/A|.R|/Some.foo|(Int(-1)) - lval res3: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!| = this@R|/A|.R|/Some.bar|(R|kotlin/intArrayOf|(vararg(Int(0), Int(2), Int(-2)))) + lval res3: R|ft!>, kotlin/Array!>?>!| = this@R|/A|.R|/Some.bar|(R|kotlin/intArrayOf|(vararg(Int(0), Int(2), Int(-2)))) } } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.fir.txt index 51ffabae66e..a9aed2b659c 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.fir.txt @@ -1,14 +1,14 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { - Q|JavaClass|.R|/JavaClass.foo1|( = foo1@fun (): R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!| { + Q|JavaClass|.R|/JavaClass.foo1|( = foo1@fun (): R|ft!| { ^ Int(123) } ) - Q|JavaClass|.R|/JavaClass.foo2|( = foo2@fun (it: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| { + Q|JavaClass|.R|/JavaClass.foo2|( = foo2@fun (it: R|ft!|): R|ft!| { ^ R|/it|.R|kotlin/Int.plus|(Int(2)).R|kotlin/Any.toString|() } ) - Q|JavaClass|.R|/JavaClass.foo2|(foo2@fun (it: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| { + Q|JavaClass|.R|/JavaClass.foo2|(foo2@fun (it: R|ft!|): R|ft!| { ^ R|/it|.R|kotlin/Int.plus|(Int(3)).R|kotlin/Any.toString|() } ) @@ -17,7 +17,7 @@ FILE: main.kt } Q|JavaClass|.R|/JavaClass.foo2|(R|/y|) - Q|JavaClass|.R|/JavaClass.foo3|!|>(foo3@fun (it: R|ft!|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| { + Q|JavaClass|.R|/JavaClass.foo3|!|>(foo3@fun (it: R|ft!|): R|ft!| { ^ R|/it|.R|kotlin/Int.plus|(Int(4)).R|kotlin/Any.toString|() } , Int(5)) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaGetPrefixConflict.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaGetPrefixConflict.fir.txt index 0328ae65888..3ed448a15ad 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaGetPrefixConflict.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaGetPrefixConflict.fir.txt @@ -1,8 +1,8 @@ FILE: Test.kt public final fun test(): R|kotlin/Unit| { lval jc: R|JavaClass| = R|/JavaClass.JavaClass|() - lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/jc|.R|/JavaClass.text| + lval result: R|ft!| = R|/jc|.R|/JavaClass.text| } public final fun otherTest(jc: R|JavaClass|): R|kotlin/Unit| { - lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/jc|.R|/JavaClass.text| + lval result: R|ft!| = R|/jc|.R|/JavaClass.text| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaSyntheticProperty.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaSyntheticProperty.fir.txt index bd1f495d347..a751a98a432 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaSyntheticProperty.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaSyntheticProperty.fir.txt @@ -1,3 +1,3 @@ FILE: test.kt - public final val x: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/JavaClass.JavaClass|().R|/JavaClass.foo| - public get(): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public final val x: R|ft!| = R|/JavaClass.JavaClass|().R|/JavaClass.foo| + public get(): R|ft!| diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKInheritanceGeneric.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKInheritanceGeneric.fir.txt index a605f4c656b..c73fe5ddeef 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKInheritanceGeneric.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKInheritanceGeneric.fir.txt @@ -16,7 +16,7 @@ FILE: K2.kt } public final fun bar(): R|kotlin/Unit| { - this@R|/K2|.R|SubstitutionOverride!|>|(Int(1)) + this@R|/K2|.R|SubstitutionOverride!|>|(Int(1)) this@R|/K2|.R|/J1.baz|() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameterGeneric.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameterGeneric.fir.txt index 3e84bb2e8f9..f14d31a1cfa 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameterGeneric.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameterGeneric.fir.txt @@ -7,7 +7,7 @@ FILE: K1.kt } FILE: K2.kt public final fun main(): R|kotlin/Unit| { - Q|JavaClass|.R|/JavaClass.baz|(R|/KotlinClass.KotlinClass|!|>()) + Q|JavaClass|.R|/JavaClass.baz|(R|/KotlinClass.KotlinClass|!|>()) Q|JavaClass|.R|/JavaClass.baz|(R|/KotlinClass.KotlinClass|()) Q|JavaClass|.#(R|/KotlinClass.KotlinClass|()) Q|JavaClass|.#(String()) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/LoggerInstance.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/LoggerInstance.fir.txt index 9a4cf367e7b..5ee849464da 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/LoggerInstance.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/LoggerInstance.fir.txt @@ -1,6 +1,6 @@ FILE: test.kt public final fun test(): R|kotlin/Unit| { - lval logger: R|ft<@FlexibleNullability Logger, Logger?>!| = Q|Logger|.R|/Logger.getInstance|(String(test)) + lval logger: R|ft!| = Q|Logger|.R|/Logger.getInstance|(String(test)) } public final class MyTest : R|kotlin/Any| { public constructor(): R|MyTest| { @@ -10,7 +10,7 @@ FILE: test.kt private final val klass: R|java/lang/Class| = (this@R|/MyTest|).R|kotlin/jvm/java| private get(): R|java/lang/Class| - private final val logger: R|ft<@FlexibleNullability Logger, Logger?>!| = Q|Logger|.R|/Logger.getInstance|(this@R|/MyTest|.R|/MyTest.klass|) - private get(): R|ft<@FlexibleNullability Logger, Logger?>!| + private final val logger: R|ft!| = Q|Logger|.R|/Logger.getInstance|(this@R|/MyTest|.R|/MyTest.klass|) + private get(): R|ft!| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapEntry.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapEntry.fir.txt index 65ec39f0290..51d578095bb 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapEntry.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapEntry.fir.txt @@ -7,7 +7,7 @@ FILE: main.kt } public final fun test(): R|kotlin/Unit| { lval b: R|MyMapEntry| = R|/MyMapEntry.MyMapEntry|() - lval key: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/b|.R|/Test.MapEntryImpl.key| - lval value: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/b|.R|/Test.MapEntryImpl.value| + lval key: R|ft!| = R|/b|.R|/Test.MapEntryImpl.key| + lval value: R|ft!| = R|/b|.R|/Test.MapEntryImpl.value| R|/b|.R|/Test.MapEntryImpl.setValue|(Null(null)) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyException.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyException.fir.txt index 0acf4385041..9851d0be53c 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyException.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyException.fir.txt @@ -8,15 +8,15 @@ FILE: test.kt public final fun test(e: R|MyException|, stream: R|java/io/PrintStream|): R|kotlin/Unit| { R|/e|.R|java/lang/Throwable.printStackTrace|() R|/e|.R|java/lang/Throwable.printStackTrace|(R|/stream|) - lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/e|.R|java/lang/Throwable.getLocalizedMessage|() + lval result: R|ft!| = R|/e|.R|java/lang/Throwable.getLocalizedMessage|() } public final fun test(e: R|YourException|, stream: R|java/io/PrintStream|): R|kotlin/Unit| { R|/e|.R|java/lang/Throwable.printStackTrace|() R|/e|.R|java/lang/Throwable.printStackTrace|(R|/stream|) - lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/e|.R|java/lang/Throwable.getLocalizedMessage|() + lval result: R|ft!| = R|/e|.R|java/lang/Throwable.getLocalizedMessage|() } public final fun test(e: R|kotlin/Exception|, stream: R|java/io/PrintStream|): R|kotlin/Unit| { R|/e|.R|java/lang/Throwable.printStackTrace|() R|/e|.R|java/lang/Throwable.printStackTrace|(R|/stream|) - lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/e|.R|java/lang/Throwable.getLocalizedMessage|() + lval result: R|ft!| = R|/e|.R|java/lang/Throwable.getLocalizedMessage|() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyIterable.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyIterable.fir.txt index ce966796c07..38b30aa4608 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyIterable.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyIterable.fir.txt @@ -2,11 +2,11 @@ FILE: test.kt public abstract interface UseIterable : R|MyIterable| { public open fun test(): R|kotlin/Unit| { lval it: R|kotlin/collections/MutableIterator!>| = this@R|/UseIterable|.R|SubstitutionOverride!>|>|() - lval split: R|@FlexibleNullability java/util/Spliterator!>| = this@R|/UseIterable|.R|SubstitutionOverride!>|>|() + lval split: R|java/util/Spliterator!>| = this@R|/UseIterable|.R|SubstitutionOverride!>|>|() } } public final fun test(some: R|kotlin/collections/Iterable|): R|kotlin/Unit| { lval it: R|kotlin/collections/Iterator| = R|/some|.R|SubstitutionOverride|>|() - lval split: R|@FlexibleNullability java/util/Spliterator!>| = R|/some|.R|SubstitutionOverride!>|>|() + lval split: R|java/util/Spliterator!>| = R|/some|.R|SubstitutionOverride!>|>|() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.fir.txt index f378e0039a4..59a683fff4e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.fir.txt @@ -1,20 +1,20 @@ FILE: test.kt public final fun test(map: R|MyMap|): R|kotlin/Unit| { - lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/map|.R|kotlin/collections/getOrPut|!|, R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|>(String(key), = getOrPut@fun (): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| { + lval result: R|ft!| = R|/map|.R|kotlin/collections/getOrPut|!|, R|ft!|>(String(key), = getOrPut@fun (): R|ft!| { ^ String(value) } ) - lval otherResult: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/map|.R|SubstitutionOverride!|>|(String(key), String(value)) - lval anotherResult: R|@FlexibleNullability kotlin/String?| = R|/map|.R|SubstitutionOverride|(String(key), String(value)) - R|/map|.R|SubstitutionOverride|( = forEach@fun (key: R|ft<@FlexibleNullability kotlin/String, @FlexibleNullability kotlin/String?>!|, value: R|ft<@FlexibleNullability kotlin/String, @FlexibleNullability kotlin/String?>!|): R|kotlin/Unit| { + lval otherResult: R|ft!| = R|/map|.R|SubstitutionOverride!|>|(String(key), String(value)) + lval anotherResult: R|kotlin/String?| = R|/map|.R|SubstitutionOverride|(String(key), String(value)) + R|/map|.R|SubstitutionOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { R|kotlin/io/println|((R|/key|.R|kotlin/Any.toString|(), String(: ), R|/value|.R|kotlin/Any.toString|())) R|/key|.R|kotlin/String.length| R|/value|.R|kotlin/String.length| } ) - R|/map|.R|kotlin/collections/forEach|!|, R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|>( = forEach@fun (: R|kotlin/collections/Map.Entry!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>|): R|kotlin/Unit| { - lval key: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/|.R|kotlin/collections/component1|!|, R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|>() - lval value: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/|.R|kotlin/collections/component2|!|, R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|>() + R|/map|.R|kotlin/collections/forEach|!|, R|ft!|>( = forEach@fun (: R|kotlin/collections/Map.Entry!, ft!>|): R|kotlin/Unit| { + lval key: R|ft!| = R|/|.R|kotlin/collections/component1|!|, R|ft!|>() + lval value: R|ft!| = R|/|.R|kotlin/collections/component2|!|, R|ft!|>() R|kotlin/io/println|((R|/key|.R|kotlin/Any.toString|(), String(: ), R|/value|.R|kotlin/Any.toString|())) R|/key|.R|kotlin/String.length| R|/value|.R|kotlin/String.length| diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/RawType.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/RawType.kt index a686df1df2c..feedfe505db 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/RawType.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/RawType.kt @@ -1,4 +1,6 @@ +// FULL_JDK // FILE: JavaClass.java +import java.util.ArrayList; public class JavaClass { public static void foo(ArrayList list) {} @@ -10,4 +12,4 @@ class Some fun test(list: ArrayList) { JavaClass.foo(list) -} \ No newline at end of file +} diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/StaticFromBaseClass.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/StaticFromBaseClass.fir.txt index 5a22a85ba88..4f5ef00241c 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/StaticFromBaseClass.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/StaticFromBaseClass.fir.txt @@ -1,5 +1,5 @@ FILE: main.kt public final fun test(): R|kotlin/Unit| { - lval project: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = Q|PlatformDataKeys|.R|/CommonDataKeys.PROJECT| - lval member: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|/PlatformDataKeys.PlatformDataKeys|().R|/CommonDataKeys.MEMBER| + lval project: R|ft!| = Q|PlatformDataKeys|.R|/CommonDataKeys.PROJECT| + lval member: R|ft!| = R|/PlatformDataKeys.PlatformDataKeys|().R|/CommonDataKeys.MEMBER| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.fir.txt index ff3a816c2b6..c456e26a268 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.fir.txt @@ -1,13 +1,13 @@ FILE: test.kt public final fun R|Call|.testForEach(): R|kotlin/Unit| { - this@R|/testForEach|.R|/Call.arguments|.R|SubstitutionOverride|( = forEach@fun (key: R|ft<@FlexibleNullability kotlin/String, @FlexibleNullability kotlin/String?>!|, value: R|ft<@FlexibleNullability kotlin/String, @FlexibleNullability kotlin/String?>!|): R|kotlin/Unit| { + this@R|/testForEach|.R|/Call.arguments|.R|SubstitutionOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { R|/key|.R|kotlin/String.length| R|/value|.R|kotlin/String.length| } ) - this@R|/testForEach|.R|/Call.arguments|.R|kotlin/collections/forEach|!|, R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|>( = forEach@fun (it: R|kotlin/collections/Map.Entry!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>|): R|kotlin/Unit| { - R|/it|.R|SubstitutionOverride!|>|.R|kotlin/String.length| - R|/it|.R|SubstitutionOverride!|>|.R|kotlin/String.length| + this@R|/testForEach|.R|/Call.arguments|.R|kotlin/collections/forEach|!|, R|ft!|>( = forEach@fun (it: R|kotlin/collections/Map.Entry!, ft!>|): R|kotlin/Unit| { + R|/it|.R|SubstitutionOverride!|>|.R|kotlin/String.length| + R|/it|.R|SubstitutionOverride!|>|.R|kotlin/String.length| } ) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/capturedFlexible.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/capturedFlexible.fir.txt index 21a5bd6ed63..a287c0292f3 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/capturedFlexible.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/capturedFlexible.fir.txt @@ -1,4 +1,4 @@ FILE: capturedFlexible.kt public final fun foo(z: R|java/util/zip/ZipFile|): R|kotlin/Unit| { - R|/z|.R|java/util/zip/ZipFile.entries|().R|kotlin/sequences/asSequence|!|>() + R|/z|.R|java/util/zip/ZipFile.entries|().R|kotlin/sequences/asSequence|!|>() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/complexFlexibleInference.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/complexFlexibleInference.fir.txt index 5d370cbd9af..66ee2e62e45 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/complexFlexibleInference.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/complexFlexibleInference.fir.txt @@ -1,4 +1,4 @@ FILE: main.kt public final fun bar(bindingContext: R|BindingContext|): R|kotlin/Unit| { - R|/bindingContext|.R|/BindingContext.get|!|, R|ft<@FlexibleNullability kotlin/Double, kotlin/Double?>!|>(Q|Slices|.R|/Slices.X|, R|/bindingContext|.R|/BindingContext.get|!|, R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|>(Q|Slices|.R|/Slices.Y|, Int(1))) + R|/bindingContext|.R|/BindingContext.get|!|, R|ft!|>(Q|Slices|.R|/Slices.X|, R|/bindingContext|.R|/BindingContext.get|!|, R|ft!|>(Q|Slices|.R|/Slices.Y|, Int(1))) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.fir.txt index d1b7da1b13e..12c0220f823 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.fir.txt @@ -4,5 +4,5 @@ FILE: main.kt public final typealias ImmutableLinkedHashSet = R|imm/LinkedHashSet| private final typealias ImmutableMultimap = R|ImmutableMap>| private final fun R|ImmutableMultimap|.put(key: R|K|, value: R|V|): R|kotlin/Unit| { - this@R|/put|.R|SubstitutionOverride, ImmutableSet?>!>, imm/Option, ImmutableSet?>!>?>!|>|(R|/key|).R|SubstitutionOverride, ImmutableSet?>!|>|(Q|ImmutableLinkedHashSet|.R|imm/LinkedHashSet.empty|!|>()) + this@R|/put|.R|SubstitutionOverride, ImmutableSet?>!>, imm/Option, ImmutableSet?>!>?>!|>|(R|/key|).R|SubstitutionOverride, ImmutableSet?>!|>|(Q|ImmutableLinkedHashSet|.R|imm/LinkedHashSet.empty|!|>()) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.kt index 39aa6734f45..856f5218bbe 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.kt @@ -2,7 +2,7 @@ // FILE: imm/Map.java package imm; public interface Map { - Option get(k K); + Option get(K k); } // FILE: imm/Set.java diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt index bf07f94a11f..989f841e1e7 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt @@ -108,6 +108,9 @@ object StandardClassIds { val MutableMapEntry = MutableMap.createNestedClassId(Name.identifier("MutableEntry")) val Suppress = "Suppress".baseId() + + val FlexibleNullability = ClassId(FqName("kotlin.internal.ir"), Name.identifier("FlexibleNullability")) + val EnhancedNullability = ClassId(FqName("kotlin.jvm.internal"), Name.identifier("EnhancedNullability")) } private fun Map.inverseMap() = entries.associate { (k, v) -> v to k } diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/CompilerConeAttributes.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/CompilerConeAttributes.kt index bd90bcb7298..899731a0465 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/CompilerConeAttributes.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/CompilerConeAttributes.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.fir.types +import org.jetbrains.kotlin.fir.symbols.StandardClassIds import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name @@ -36,7 +37,7 @@ object CompilerConeAttributes { } object EnhancedNullability : ConeAttribute() { - val ANNOTATION_CLASS_ID = ClassId(FqName("kotlin.jvm.internal"), Name.identifier("EnhancedNullability")) + val ANNOTATION_CLASS_ID = StandardClassIds.EnhancedNullability override fun union(other: EnhancedNullability?): EnhancedNullability? = other override fun intersect(other: EnhancedNullability?): EnhancedNullability = this @@ -59,18 +60,6 @@ object CompilerConeAttributes { override fun toString(): String = "@ExtensionFunctionType" } - object FlexibleNullability : ConeAttribute() { - val ANNOTATION_CLASS_ID = ClassId(FqName("kotlin.internal.ir"), Name.identifier("FlexibleNullability")) - - override fun union(other: FlexibleNullability?): FlexibleNullability? = other - override fun intersect(other: FlexibleNullability?): FlexibleNullability = this - override fun isSubtypeOf(other: FlexibleNullability?): Boolean = true - - override val key: KClass = FlexibleNullability::class - - override fun toString(): String = "@FlexibleNullability" - } - object UnsafeVariance : ConeAttribute() { val ANNOTATION_CLASS_ID = ClassId(FqName("kotlin"), Name.identifier("UnsafeVariance")) @@ -88,7 +77,6 @@ object CompilerConeAttributes { NoInfer.ANNOTATION_CLASS_ID to NoInfer, EnhancedNullability.ANNOTATION_CLASS_ID to EnhancedNullability, ExtensionFunctionType.ANNOTATION_CLASS_ID to ExtensionFunctionType, - FlexibleNullability.ANNOTATION_CLASS_ID to FlexibleNullability, UnsafeVariance.ANNOTATION_CLASS_ID to UnsafeVariance ) @@ -99,14 +87,17 @@ val ConeAttributes.exact: CompilerConeAttributes.Exact? by ConeAttributes.attrib val ConeAttributes.noInfer: CompilerConeAttributes.NoInfer? by ConeAttributes.attributeAccessor() val ConeAttributes.enhancedNullability: CompilerConeAttributes.EnhancedNullability? by ConeAttributes.attributeAccessor() val ConeAttributes.extensionFunctionType: CompilerConeAttributes.ExtensionFunctionType? by ConeAttributes.attributeAccessor() -val ConeAttributes.flexibleNullability: CompilerConeAttributes.FlexibleNullability? by ConeAttributes.attributeAccessor() val ConeAttributes.unsafeVarianceType: CompilerConeAttributes.UnsafeVariance? by ConeAttributes.attributeAccessor() +// ------------------------------------------------------------------ + +val ConeAttributes.hasEnhancedNullability: Boolean + get() = enhancedNullability != null + +// ------------------------------------------------------------------ + val ConeKotlinType.hasEnhancedNullability: Boolean get() = attributes.enhancedNullability != null val ConeKotlinType.isExtensionFunctionType: Boolean get() = attributes.extensionFunctionType != null - -val ConeKotlinType.hasFlexibleNullability: Boolean - get() = attributes.flexibleNullability != null diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeAttributes.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeAttributes.kt index a7c79829d64..57eafdfa361 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeAttributes.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeAttributes.kt @@ -36,7 +36,12 @@ class ConeAttributes private constructor(attributes: List>) : A val Empty: ConeAttributes = ConeAttributes(emptyList()) val WithExtensionFunctionType: ConeAttributes = ConeAttributes(listOf(CompilerConeAttributes.ExtensionFunctionType)) - internal val WithFlexibleNullability: ConeAttributes = ConeAttributes(listOf(CompilerConeAttributes.FlexibleNullability)) + + private val predefinedAttributes: Map, ConeAttributes> = mapOf( + CompilerConeAttributes.EnhancedNullability.predefined() + ) + + private fun ConeAttribute<*>.predefined(): Pair, ConeAttributes> = this to ConeAttributes(this) fun create(attributes: List>): ConeAttributes { return if (attributes.isEmpty()) { @@ -47,21 +52,14 @@ class ConeAttributes private constructor(attributes: List>) : A } } + private constructor(attribute: ConeAttribute<*>) : this(listOf(attribute)) + init { for (attribute in attributes) { registerComponent(attribute.key, attribute) } - assert(!hasEnhancedNullability || !hasFlexibleNullability) { - "It doesn't make sense to have @EnhancedNullability and @FlexibleNullability at the same time." - } } - val hasEnhancedNullability: Boolean - get() = enhancedNullability != null - - private val hasFlexibleNullability: Boolean - get() = flexibleNullability != null - fun union(other: ConeAttributes): ConeAttributes { return perform(other) { this.union(it) } } @@ -70,6 +68,22 @@ class ConeAttributes private constructor(attributes: List>) : A return perform(other) { this.intersect(it) } } + operator fun contains(attribute: ConeAttribute<*>): Boolean { + val index = getId(attribute.key) + return arrayMap[index] != null + } + + @OptIn(ExperimentalStdlibApi::class) + operator fun plus(attribute: ConeAttribute<*>): ConeAttributes { + if (attribute in this) return this + if (isEmpty()) return predefinedAttributes[attribute] ?: ConeAttributes(attribute) + val newAttributes = buildList { + addAll(this) + add(attribute) + } + return ConeAttributes(newAttributes) + } + fun remove(attribute: ConeAttribute<*>): ConeAttributes { if (arrayMap.isEmpty()) return this val attributes = arrayMap.filter { it != attribute } @@ -100,12 +114,3 @@ class ConeAttributes private constructor(attributes: List>) : A return arrayMap.isEmpty() } } - -private fun ConeAttributes.intersectUnless(other: ConeAttributes, predicate: (ConeAttributes) -> Boolean): ConeAttributes = - if (predicate.invoke(this)) this else intersect(other) - -fun ConeAttributes.withFlexible(): ConeAttributes = - intersect(ConeAttributes.WithFlexibleNullability) - -fun ConeAttributes.withFlexibleUnless(predicate: (ConeAttributes) -> Boolean): ConeAttributes = - intersectUnless(ConeAttributes.WithFlexibleNullability, predicate) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltIns.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltIns.kt index 00bed03959b..3094e0d8878 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltIns.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltIns.kt @@ -6,7 +6,7 @@ package org.jetbrains.kotlin.fir.backend import org.jetbrains.kotlin.fir.resolve.symbolProvider -import org.jetbrains.kotlin.fir.types.CompilerConeAttributes +import org.jetbrains.kotlin.fir.symbols.StandardClassIds import org.jetbrains.kotlin.ir.declarations.IrConstructor import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl @@ -24,14 +24,14 @@ class Fir2IrBuiltIns( } private val enhancedNullabilityAnnotationSymbol by lazy { - annotationSymbolById(CompilerConeAttributes.EnhancedNullability.ANNOTATION_CLASS_ID) + annotationSymbolById(StandardClassIds.EnhancedNullability) } internal fun enhancedNullabilityAnnotationConstructorCall(): IrConstructorCall? = enhancedNullabilityAnnotationSymbol?.toConstructorCall() private val flexibleNullabilityAnnotationSymbol by lazy { - annotationSymbolById(CompilerConeAttributes.FlexibleNullability.ANNOTATION_CLASS_ID) + annotationSymbolById(StandardClassIds.FlexibleNullability) } internal fun flexibleNullabilityAnnotationConstructorCall(): IrConstructorCall? = diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrImplicitCastInserter.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrImplicitCastInserter.kt index faaffaf03bf..cb39e86be00 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrImplicitCastInserter.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrImplicitCastInserter.kt @@ -219,9 +219,6 @@ class Fir2IrImplicitCastInserter( } private fun FirTypeRef.isNullabilityFlexible(): Boolean { - if (hasFlexibleNullability()) { - return true - } val flexibility = coneTypeSafe() ?: return false return flexibility.lowerBound.isMarkedNullable != flexibility.upperBound.isMarkedNullable } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt index 3e0c3b4438a..94f77ecbcbd 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrTypeConverter.kt @@ -9,7 +9,6 @@ import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall import org.jetbrains.kotlin.fir.expressions.classId import org.jetbrains.kotlin.fir.resolve.fullyExpandedType import org.jetbrains.kotlin.fir.resolve.substitution.AbstractConeSubstitutor -import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.symbols.StandardClassIds import org.jetbrains.kotlin.fir.typeContext @@ -85,7 +84,8 @@ class Fir2IrTypeConverter( fun ConeKotlinType.toIrType( typeContext: ConversionTypeContext = ConversionTypeContext.DEFAULT, - annotations: List = emptyList() + annotations: List = emptyList(), + hasFlexibleNullability: Boolean = false ): IrType { return when (this) { is ConeKotlinErrorType -> createErrorType() @@ -101,8 +101,7 @@ class Fir2IrTypeConverter( builtIns.enhancedNullabilityAnnotationConstructorCall()?.let { typeAnnotations += it } - } - if (hasFlexibleNullability) { + } else if (hasFlexibleNullability) { builtIns.flexibleNullabilityAnnotationConstructorCall()?.let { typeAnnotations += it } @@ -121,7 +120,7 @@ class Fir2IrTypeConverter( } is ConeFlexibleType -> { // TODO: yet we take more general type. Not quite sure it's Ok - upperBound.toIrType(typeContext) + upperBound.toIrType(typeContext, hasFlexibleNullability = lowerBound.nullability != upperBound.nullability) } is ConeCapturedType -> { val cached = capturedTypeCache[this] diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt index 4962eb1e781..e840312fe21 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt @@ -35,7 +35,6 @@ import org.jetbrains.kotlin.fir.symbols.impl.ConeClassLikeLookupTagImpl import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef -import org.jetbrains.kotlin.fir.types.builder.buildImplicitTypeRef import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef import org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl import org.jetbrains.kotlin.fir.types.impl.ConeTypeParameterTypeImpl @@ -224,7 +223,7 @@ private fun ClassId.toConeFlexibleType( toConeKotlinType( typeArguments, isNullable = false, - attributes.withFlexibleUnless { it.hasEnhancedNullability } + attributes ), toConeKotlinType(typeArgumentsForUpper, isNullable = true, attributes) ) @@ -264,12 +263,7 @@ private fun JavaClassifierType.toConeKotlinTypeWithoutEnhancement( return if (isRaw) ConeRawType(lowerBound, upperBound) else - ConeFlexibleType( - lowerBound.withAttributes( - lowerBound.attributes.withFlexibleUnless { it.hasEnhancedNullability } - ), - upperBound - ) + ConeFlexibleType(lowerBound, upperBound) } private fun computeRawProjection( @@ -339,9 +333,7 @@ private fun getErasedVersionOfFirstUpperBound( if (firstUpperBound.upperBound is ConeTypeParameterType) { // Avoid exponential complexity ConeFlexibleType( - lowerBound.withAttributes( - lowerBound.attributes.withFlexibleUnless { it.hasEnhancedNullability } - ), + lowerBound, lowerBound.withNullability(ConeNullability.NULLABLE) ) } else { diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt index b25ce89fe98..f11796b6578 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/javaTypeUtils.kt @@ -9,8 +9,12 @@ import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.fir.FirSession -import org.jetbrains.kotlin.fir.declarations.* -import org.jetbrains.kotlin.fir.expressions.* +import org.jetbrains.kotlin.fir.declarations.FirRegularClass +import org.jetbrains.kotlin.fir.declarations.collectEnumEntries +import org.jetbrains.kotlin.fir.declarations.isStatic +import org.jetbrains.kotlin.fir.declarations.modality +import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall +import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.builder.buildConstExpression import org.jetbrains.kotlin.fir.expressions.builder.buildQualifiedAccessExpression import org.jetbrains.kotlin.fir.java.declarations.FirJavaClass @@ -34,13 +38,12 @@ import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.types.AbstractStrictEqualityTypeChecker import org.jetbrains.kotlin.types.ConstantValueKind -import org.jetbrains.kotlin.types.RawType import org.jetbrains.kotlin.utils.extractRadix internal class IndexedJavaTypeQualifiers(private val data: Array) { constructor(size: Int, compute: (Int) -> JavaTypeQualifiers) : this(Array(size) { compute(it) }) - operator fun invoke(index: Int) = data.getOrElse(index) { JavaTypeQualifiers.NONE } + operator fun invoke(index: Int): JavaTypeQualifiers = data.getOrElse(index) { JavaTypeQualifiers.NONE } val size: Int get() = data.size } @@ -78,20 +81,17 @@ private fun ConeKotlinType.enhanceConeKotlinType( ): ConeKotlinType { return when (this) { is ConeFlexibleType -> { - val needsFlexibleNullabilityAttribute = lowerBound.nullability != upperBound.nullability && !lowerBound.hasEnhancedNullability + val isRawType = this is ConeRawType + val lowerResult = lowerBound.enhanceInflexibleType( - session, TypeComponentPosition.FLEXIBLE_LOWER, qualifiers, index, - attributes = if (needsFlexibleNullabilityAttribute) - lowerBound.attributes.withFlexible() - else - lowerBound.attributes + session, TypeComponentPosition.FLEXIBLE_LOWER, qualifiers, index, isRawType ) val upperResult = upperBound.enhanceInflexibleType( - session, TypeComponentPosition.FLEXIBLE_UPPER, qualifiers, index, upperBound.attributes + session, TypeComponentPosition.FLEXIBLE_UPPER, qualifiers, index, isRawType ) when { - !needsFlexibleNullabilityAttribute && lowerResult === lowerBound && upperResult === upperBound -> this + lowerResult === lowerBound && upperResult === upperBound -> this this is ConeRawType -> ConeRawType(lowerResult, upperResult) else -> coneFlexibleOrSimpleType( session, lowerResult, upperResult, isNotNullTypeParameter = qualifiers(index).isNotNullTypeParameter @@ -99,7 +99,7 @@ private fun ConeKotlinType.enhanceConeKotlinType( } } is ConeSimpleKotlinType -> enhanceInflexibleType( - session, TypeComponentPosition.INFLEXIBLE, qualifiers, index, attributes + session, TypeComponentPosition.INFLEXIBLE, qualifiers, index, isBoundOfRawType = false ) else -> this } @@ -156,12 +156,13 @@ private fun ConeKotlinType.enhanceInflexibleType( position: TypeComponentPosition, qualifiers: IndexedJavaTypeQualifiers, index: Int, - attributes: ConeAttributes = this.attributes + @Suppress("UNUSED_PARAMETER") isBoundOfRawType: Boolean, ): ConeKotlinType { - require(this !is ConeFlexibleType) { - "$this should not be flexible" + require(this !is ConeFlexibleType) { "$this should not be flexible" } + val shouldEnhance = position.shouldEnhance() + if (!shouldEnhance && typeArguments.isEmpty() || this !is ConeLookupTagBasedType) { + return this } - if (this !is ConeLookupTagBasedType) return this val originalTag = lookupTag @@ -170,52 +171,54 @@ private fun ConeKotlinType.enhanceInflexibleType( var wereChangesInArgs = false - val enhancedArguments = if (this is RawType) { - // TODO: Support enhancing for raw types - typeArguments - } else { - var globalArgIndex = index + 1 - typeArguments.map { arg -> - if (arg.kind != ProjectionKind.INVARIANT) { - globalArgIndex++ - arg - } else { - require(arg is ConeKotlinType) { "Should be invariant type: $arg" } - globalArgIndex += arg.subtreeSize() + var globalArgIndex = index + 1 + val enhancedArguments = typeArguments.map { arg -> + if (arg.kind != ProjectionKind.INVARIANT) { + globalArgIndex++ + arg + } else { + require(arg is ConeKotlinType) { "Should be invariant type: $arg" } + globalArgIndex += arg.subtreeSize() - arg.enhanceConeKotlinType(session, qualifiers, globalArgIndex).also { - if (it !== arg) { - wereChangesInArgs = true - } - } - } - }.toTypedArray() + val enhanced = arg.enhanceConeKotlinType(session, qualifiers, globalArgIndex) + wereChangesInArgs = wereChangesInArgs || enhanced !== arg + enhanced.type + } + }.toTypedArray() + + val (enhancedNullability, enhancedNullabilityAttribute) = getEnhancedNullability(effectiveQualifiers, position) + wereChangesInArgs = wereChangesInArgs || (enhancedNullabilityAttribute != null && !this.hasEnhancedNullability) + + if (!wereChangesInArgs && originalTag == enhancedTag && enhancedNullability == isNullable) { + return this } - val enhancedNullability = getEnhancedNullability(effectiveQualifiers, position) - - if (!wereChangesInArgs && originalTag == enhancedTag && enhancedNullability == isNullable) return this - - val enhancedType = enhancedTag.constructType(enhancedArguments, enhancedNullability, attributes) + var attributes = this.attributes + enhancedNullabilityAttribute?.let { attributes += it } // TODO: why all of these is needed // val enhancement = if (effectiveQualifiers.isNotNullTypeParameter) NotNullTypeParameter(enhancedType) else enhancedType // val nullabilityForWarning = nullabilityChanged && effectiveQualifiers.isNullabilityQualifierForWarning // val result = if (nullabilityForWarning) wrapEnhancement(enhancement) else enhancement - return enhancedType + return enhancedTag.constructType(enhancedArguments, enhancedNullability, attributes) } -private fun getEnhancedNullability( +private data class EnhancementResult(val result: T, val enhancementAttribute: ConeAttribute<*>?) + +private fun T.noChange(): EnhancementResult = EnhancementResult(this, null) +private fun T.enhancedNullability(): EnhancementResult = EnhancementResult(this, CompilerConeAttributes.EnhancedNullability) + +private fun ConeKotlinType.getEnhancedNullability( qualifiers: JavaTypeQualifiers, position: TypeComponentPosition -): Boolean { - if (!position.shouldEnhance()) return position == TypeComponentPosition.FLEXIBLE_UPPER +): EnhancementResult { + if (!position.shouldEnhance()) return this.isMarkedNullable.noChange() return when (qualifiers.nullability) { - NullabilityQualifier.NULLABLE -> true - NullabilityQualifier.NOT_NULL -> false - else -> position == TypeComponentPosition.FLEXIBLE_UPPER + NullabilityQualifier.NULLABLE -> true.enhancedNullability() + NullabilityQualifier.NOT_NULL -> false.enhancedNullability() + else -> this.isMarkedNullable.noChange() } } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt index 0fcbef77c5a..5a562dbe10b 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt @@ -200,9 +200,6 @@ fun FirTypeRef.isUnsafeVarianceType(session: FirSession): Boolean { fun FirTypeRef.hasEnhancedNullability(): Boolean = coneTypeSafe()?.hasEnhancedNullability == true -fun FirTypeRef.hasFlexibleNullability(): Boolean = - coneTypeSafe()?.hasFlexibleNullability == true - fun FirTypeRef.withoutEnhancedNullability(): FirTypeRef { require(this is FirResolvedTypeRef) if (!hasEnhancedNullability()) return this diff --git a/compiler/testData/codegen/box/collections/kt44233.kt b/compiler/testData/codegen/box/collections/kt44233.kt index 5d2cb6cb2b1..9b2c765607e 100644 --- a/compiler/testData/codegen/box/collections/kt44233.kt +++ b/compiler/testData/codegen/box/collections/kt44233.kt @@ -1,5 +1,4 @@ // TARGET_BACKEND: JVM -// IGNORE_BACKEND_FIR: JVM_IR // FULL_JDK import java.util.concurrent.ConcurrentSkipListSet @@ -15,4 +14,4 @@ fun box(): String { "Failed" else "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/reflection/typeOf/flexibleType.kt b/compiler/testData/codegen/box/reflection/typeOf/flexibleType.kt index 0c5831aee52..ed6c3d01c6a 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/flexibleType.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/flexibleType.kt @@ -1,6 +1,5 @@ // !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM -// IGNORE_BACKEND_FIR: JVM_IR // WITH_REFLECT // FILE: box.kt diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.fir.kt index b47ca4ecb79..74d1efb30f0 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.fir.kt @@ -75,5 +75,5 @@ fun test() { } // TODO: FIR // {AbstractAssert<*, out Any!>! & EnumerableAssert<*, {Comparable<*> & java.io.Serializable!}>!} with unfolded flexible nullability - & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, @FlexibleNullability kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, @FlexibleNullability kotlin/String?!>? & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>?")!>assertion + & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String?!>? & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>?")!>assertion } diff --git a/compiler/testData/diagnostics/testsWithStdLib/java/functionN.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/java/functionN.fir.kt index 6f3227c76ac..0d24f1a4e8a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/java/functionN.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/java/functionN.fir.kt @@ -47,7 +47,7 @@ fun main() { a.baz(listOf()) a.manyParams(null) - a.manyParams(any>()) + a.manyParams(any>()) // Potentially, this would have better to forbid calling manyParams, too. // But it might be complicated because we need to match that it is an override diff --git a/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.kt.txt b/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.kt.txt index 9dbc002b18e..a5d924d308d 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.kt.txt @@ -9,11 +9,11 @@ class Test : J { .#<$$delegate_0>.takeNotNull(x = x) } - override fun takeNullable(x: @FlexibleNullability String?) { + override fun takeNullable(x: @EnhancedNullability String?) { .#<$$delegate_0>.takeNullable(x = x) } - override fun takeFlexible(x: String?) { + override fun takeFlexible(x: @FlexibleNullability String?) { .#<$$delegate_0>.takeFlexible(x = x) } @@ -23,11 +23,11 @@ class Test : J { } @Nullable - override fun returnNullable(): @FlexibleNullability String? { + override fun returnNullable(): @EnhancedNullability String? { return .#<$$delegate_0>.returnNullable() } - override fun returnsFlexible(): String? { + override fun returnsFlexible(): @FlexibleNullability String? { return .#<$$delegate_0>.returnsFlexible() } @@ -37,3 +37,4 @@ class Test : J { private get } + diff --git a/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.txt b/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.txt index 105e2ee38fb..ef7bb38af6b 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementationOfJavaInterface.fir.txt @@ -16,26 +16,26 @@ FILE fqName: fileName:/delegatedImplementationOfJavaInterface.kt $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .Test declared in .Test.takeNotNull' type=.Test origin=null x: GET_VAR 'x: @[EnhancedNullability] kotlin.String declared in .Test.takeNotNull' type=@[EnhancedNullability] kotlin.String origin=null - FUN DELEGATED_MEMBER name:takeNullable visibility:public modality:OPEN <> ($this:.Test, x:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Unit + FUN DELEGATED_MEMBER name:takeNullable visibility:public modality:OPEN <> ($this:.Test, x:@[EnhancedNullability] kotlin.String?) returnType:kotlin.Unit overridden: - public abstract fun takeNullable (x: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in .J + public abstract fun takeNullable (x: @[EnhancedNullability] kotlin.String?): kotlin.Unit declared in .J + $this: VALUE_PARAMETER name: type:.Test + VALUE_PARAMETER name:x index:0 type:@[EnhancedNullability] kotlin.String? + BLOCK_BODY + CALL 'public abstract fun takeNullable (x: @[EnhancedNullability] kotlin.String?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null + receiver: GET_VAR ': .Test declared in .Test.takeNullable' type=.Test origin=null + x: GET_VAR 'x: @[EnhancedNullability] kotlin.String? declared in .Test.takeNullable' type=@[EnhancedNullability] kotlin.String? origin=null + FUN DELEGATED_MEMBER name:takeFlexible visibility:public modality:OPEN <> ($this:.Test, x:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Unit + overridden: + public abstract fun takeFlexible (x: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in .J $this: VALUE_PARAMETER name: type:.Test VALUE_PARAMETER name:x index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - CALL 'public abstract fun takeNullable (x: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null - receiver: GET_VAR ': .Test declared in .Test.takeNullable' type=.Test origin=null - x: GET_VAR 'x: @[FlexibleNullability] kotlin.String? declared in .Test.takeNullable' type=@[FlexibleNullability] kotlin.String? origin=null - FUN DELEGATED_MEMBER name:takeFlexible visibility:public modality:OPEN <> ($this:.Test, x:kotlin.String?) returnType:kotlin.Unit - overridden: - public abstract fun takeFlexible (x: kotlin.String?): kotlin.Unit declared in .J - $this: VALUE_PARAMETER name: type:.Test - VALUE_PARAMETER name:x index:0 type:kotlin.String? - BLOCK_BODY - CALL 'public abstract fun takeFlexible (x: kotlin.String?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public abstract fun takeFlexible (x: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .Test declared in .Test.takeFlexible' type=.Test origin=null - x: GET_VAR 'x: kotlin.String? declared in .Test.takeFlexible' type=kotlin.String? origin=null + x: GET_VAR 'x: @[FlexibleNullability] kotlin.String? declared in .Test.takeFlexible' type=@[FlexibleNullability] kotlin.String? origin=null FUN DELEGATED_MEMBER name:returnNotNull visibility:public modality:OPEN <> ($this:.Test) returnType:@[EnhancedNullability] kotlin.String annotations: NotNull(value = ) @@ -47,24 +47,24 @@ FILE fqName: fileName:/delegatedImplementationOfJavaInterface.kt CALL 'public abstract fun returnNotNull (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .Test declared in .Test.returnNotNull' type=.Test origin=null - FUN DELEGATED_MEMBER name:returnNullable visibility:public modality:OPEN <> ($this:.Test) returnType:@[FlexibleNullability] kotlin.String? + FUN DELEGATED_MEMBER name:returnNullable visibility:public modality:OPEN <> ($this:.Test) returnType:@[EnhancedNullability] kotlin.String? annotations: Nullable(value = ) overridden: - public abstract fun returnNullable (): @[FlexibleNullability] kotlin.String? declared in .J + public abstract fun returnNullable (): @[EnhancedNullability] kotlin.String? declared in .J $this: VALUE_PARAMETER name: type:.Test BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun returnNullable (): @[FlexibleNullability] kotlin.String? declared in .Test' - CALL 'public abstract fun returnNullable (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null + RETURN type=kotlin.Nothing from='public open fun returnNullable (): @[EnhancedNullability] kotlin.String? declared in .Test' + CALL 'public abstract fun returnNullable (): @[EnhancedNullability] kotlin.String? declared in .J' type=@[EnhancedNullability] kotlin.String? origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .Test declared in .Test.returnNullable' type=.Test origin=null - FUN DELEGATED_MEMBER name:returnsFlexible visibility:public modality:OPEN <> ($this:.Test) returnType:kotlin.String? + FUN DELEGATED_MEMBER name:returnsFlexible visibility:public modality:OPEN <> ($this:.Test) returnType:@[FlexibleNullability] kotlin.String? overridden: - public abstract fun returnsFlexible (): kotlin.String? declared in .J + public abstract fun returnsFlexible (): @[FlexibleNullability] kotlin.String? declared in .J $this: VALUE_PARAMETER name: type:.Test BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun returnsFlexible (): kotlin.String? declared in .Test' - CALL 'public abstract fun returnsFlexible (): kotlin.String? declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='public open fun returnsFlexible (): @[FlexibleNullability] kotlin.String? declared in .Test' + CALL 'public abstract fun returnsFlexible (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .Test declared in .Test.returnsFlexible' type=.Test origin=null FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final] diff --git a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.kt.txt b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.kt.txt index 229572c961a..485e89be08e 100644 --- a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.kt.txt @@ -19,8 +19,8 @@ class K2 : JFoo { } - override fun foo(): @FlexibleNullability String { - return super.foo() + override fun foo(): String { + return super.foo() /*!! String */ } } @@ -41,7 +41,7 @@ class K4 : JUnrelatedFoo, IFoo { } - override fun foo(): String? { + override fun foo(): @FlexibleNullability String? { return super.foo() } @@ -121,3 +121,4 @@ class TestK4 : IFoo { local /* final field */ val <$$delegate_0>: IFoo = K4() } + diff --git a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.txt b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.txt index 54fc55c0915..e7a986c8389 100644 --- a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.txt +++ b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.txt @@ -22,9 +22,9 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFoo' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K1 modality:FINAL visibility:public superTypes:[.JFoo]' - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:.JFoo) returnType:@[FlexibleNullability] kotlin.String [fake_override] + FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:.JFoo) returnType:@[EnhancedNullability] kotlin.String [fake_override] overridden: - public open fun foo (): @[FlexibleNullability] kotlin.String declared in .JFoo + public open fun foo (): @[EnhancedNullability] kotlin.String declared in .JFoo $this: VALUE_PARAMETER name: type:.JFoo FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -45,14 +45,15 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFoo' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K2 modality:FINAL visibility:public superTypes:[.JFoo]' - FUN name:foo visibility:public modality:FINAL <> ($this:.K2) returnType:@[FlexibleNullability] kotlin.String + FUN name:foo visibility:public modality:FINAL <> ($this:.K2) returnType:kotlin.String overridden: - public open fun foo (): @[FlexibleNullability] kotlin.String declared in .JFoo + public open fun foo (): @[EnhancedNullability] kotlin.String declared in .JFoo $this: VALUE_PARAMETER name: type:.K2 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (): @[FlexibleNullability] kotlin.String declared in .K2' - CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String declared in .JFoo' superQualifier='CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:JFoo modality:OPEN visibility:public superTypes:[kotlin.Any; .IFoo]' type=@[FlexibleNullability] kotlin.String origin=null - $this: GET_VAR ': .K2 declared in .K2.foo' type=.K2 origin=null + RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in .K2' + TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String + CALL 'public open fun foo (): @[EnhancedNullability] kotlin.String declared in .JFoo' superQualifier='CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:JFoo modality:OPEN visibility:public superTypes:[kotlin.Any; .IFoo]' type=@[EnhancedNullability] kotlin.String origin=null + $this: GET_VAR ': .K2 declared in .K2.foo' type=.K2 origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .JFoo @@ -74,7 +75,7 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K3 modality:FINAL visibility:public superTypes:[.JUnrelatedFoo; .IFoo]' FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:.IFoo) returnType:kotlin.String [fake_override] overridden: - public open fun foo (): kotlin.String? declared in .JUnrelatedFoo + public open fun foo (): @[FlexibleNullability] kotlin.String? declared in .JUnrelatedFoo public abstract fun foo (): kotlin.String declared in .IFoo $this: VALUE_PARAMETER name: type:.IFoo FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @@ -99,14 +100,14 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JUnrelatedFoo' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K4 modality:FINAL visibility:public superTypes:[.JUnrelatedFoo; .IFoo]' - FUN name:foo visibility:public modality:FINAL <> ($this:.K4) returnType:kotlin.String? + FUN name:foo visibility:public modality:FINAL <> ($this:.K4) returnType:@[FlexibleNullability] kotlin.String? overridden: - public open fun foo (): kotlin.String? declared in .JUnrelatedFoo + public open fun foo (): @[FlexibleNullability] kotlin.String? declared in .JUnrelatedFoo public abstract fun foo (): kotlin.String declared in .IFoo $this: VALUE_PARAMETER name: type:.K4 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String? declared in .K4' - CALL 'public open fun foo (): kotlin.String? declared in .JUnrelatedFoo' superQualifier='CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:JUnrelatedFoo modality:OPEN visibility:public superTypes:[kotlin.Any]' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='public final fun foo (): @[FlexibleNullability] kotlin.String? declared in .K4' + CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in .JUnrelatedFoo' superQualifier='CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:JUnrelatedFoo modality:OPEN visibility:public superTypes:[kotlin.Any]' type=@[FlexibleNullability] kotlin.String? origin=null $this: GET_VAR ': .K4 declared in .K4.foo' type=.K4 origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/classes/kt43217.fir.txt b/compiler/testData/ir/irText/classes/kt43217.fir.txt index 3495c843784..2e01ec3f112 100644 --- a/compiler/testData/ir/irText/classes/kt43217.fir.txt +++ b/compiler/testData/ir/irText/classes/kt43217.fir.txt @@ -17,7 +17,7 @@ FILE fqName: fileName:/kt43217.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.DoubleExpression]' FUN name:get visibility:public modality:FINAL <> ($this:.A.b.) returnType:kotlin.Double [operator] overridden: - public abstract fun get (): @[FlexibleNullability] kotlin.Double [fake_override,operator] declared in .DoubleExpression + public abstract fun get (): kotlin.Double [fake_override,operator] declared in .DoubleExpression $this: VALUE_PARAMETER name: type:.A.b. BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun get (): kotlin.Double [operator] declared in .A.b.' @@ -72,7 +72,7 @@ FILE fqName: fileName:/kt43217.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.DoubleExpression]' FUN name:get visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Double [operator] overridden: - public abstract fun get (): @[FlexibleNullability] kotlin.Double [fake_override,operator] declared in .DoubleExpression + public abstract fun get (): kotlin.Double [fake_override,operator] declared in .DoubleExpression $this: VALUE_PARAMETER name: type:.C BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun get (): kotlin.Double [operator] declared in .C' diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.kt.txt index acb53720654..48eb6bfbc82 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.kt.txt @@ -44,13 +44,14 @@ class C { return .#test7$delegate.getValue(thisRef = , property = C::test7) } - var test8: Int? /* by */ + var test8: @FlexibleNullability Int? /* by */ field = hashMapOf() - get(): Int? { - return .#test8$delegate.getValue(thisRef = , property = C::test8) + get(): @FlexibleNullability Int? { + return .#test8$delegate.getValue<@FlexibleNullability Int?, @FlexibleNullability Int?>(thisRef = , property = C::test8) } - set(: Int?) { - .#test8$delegate.setValue(thisRef = , property = C::test8, value = ) + set(: @FlexibleNullability Int?) { + .#test8$delegate.setValue<@FlexibleNullability Int?>(thisRef = , property = C::test8, value = ) } } + diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt index 0937a01c2fd..1e4f1dd7d2e 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt @@ -118,30 +118,30 @@ FILE fqName: fileName:/classLevelProperties.kt CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections.MapsKt' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Int? + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:@[FlexibleNullability] kotlin.Int? correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] $this: VALUE_PARAMETER name: type:.C BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int? declared in .C' - CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Int? origin=null - : kotlin.Int? - : kotlin.Int? + RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.Int? declared in .C' + CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=@[FlexibleNullability] kotlin.Int? origin=null + : @[FlexibleNullability] kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' type=java.util.HashMap origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null - property: PROPERTY_REFERENCE 'public final test8: kotlin.Int? [delegated,var]' field=null getter='public final fun (): kotlin.Int? declared in .C' setter='public final fun (: kotlin.Int?): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :kotlin.Int?) returnType:kotlin.Unit + property: PROPERTY_REFERENCE 'public final test8: @[FlexibleNullability] kotlin.Int? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Int? declared in .C' setter='public final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, @[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] $this: VALUE_PARAMETER name: type:.C - VALUE_PARAMETER name: index:0 type:kotlin.Int? + VALUE_PARAMETER name: index:0 type:@[FlexibleNullability] kotlin.Int? BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.MapAccessorsKt.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Unit origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' type=java.util.HashMap origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null thisRef: GET_VAR ': .C declared in .C.' type=.C origin=null - property: PROPERTY_REFERENCE 'public final test8: kotlin.Int? [delegated,var]' field=null getter='public final fun (): kotlin.Int? declared in .C' setter='public final fun (: kotlin.Int?): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR ': kotlin.Int? declared in .C.' type=kotlin.Int? origin=null + property: PROPERTY_REFERENCE 'public final test8: @[FlexibleNullability] kotlin.Int? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Int? declared in .C' setter='public final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, @[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR ': @[FlexibleNullability] kotlin.Int? declared in .C.' type=@[FlexibleNullability] kotlin.Int? origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.kt.txt index 67b7211da25..0e4f6255609 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.kt.txt @@ -38,11 +38,12 @@ class C { } -var test4: Any? /* by */ +var test4: @FlexibleNullability Any? /* by */ field = hashMapOf() - get(): Any? { - return #test4$delegate.getValue(thisRef = null, property = ::test4) + get(): @FlexibleNullability Any? { + return #test4$delegate.getValue<@FlexibleNullability Any?, @FlexibleNullability Any?>(thisRef = null, property = ::test4) } - set(: Any?) { - #test4$delegate.setValue(thisRef = null, property = ::test4, value = ) + set(: @FlexibleNullability Any?) { + #test4$delegate.setValue<@FlexibleNullability Any?>(thisRef = null, property = ::test4, value = ) } + diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt index d4685811971..24712f10c48 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt @@ -105,23 +105,23 @@ FILE fqName: fileName:/delegatedProperties.kt CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections.MapsKt' type=java.util.HashMap origin=null : kotlin.String : kotlin.Any - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Any? + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.Any? correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Any? declared in ' - CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Any? origin=null - : kotlin.Any? - : kotlin.Any? + RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.Any? declared in ' + CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=@[FlexibleNullability] kotlin.Any? origin=null + : @[FlexibleNullability] kotlin.Any? + : @[FlexibleNullability] kotlin.Any? $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static]' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test4: kotlin.Any? [delegated,var]' field=null getter='public final fun (): kotlin.Any? declared in ' setter='public final fun (: kotlin.Any?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Any?) returnType:kotlin.Unit + property: PROPERTY_REFERENCE 'public final test4: @[FlexibleNullability] kotlin.Any? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Any? declared in ' setter='public final fun (: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Any?> origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:@[FlexibleNullability] kotlin.Any?) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] - VALUE_PARAMETER name: index:0 type:kotlin.Any? + VALUE_PARAMETER name: index:0 type:@[FlexibleNullability] kotlin.Any? BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.MapAccessorsKt.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Unit origin=null - : kotlin.Any? + : @[FlexibleNullability] kotlin.Any? $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test4$delegate type:java.util.HashMap visibility:private [final,static]' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test4: kotlin.Any? [delegated,var]' field=null getter='public final fun (): kotlin.Any? declared in ' setter='public final fun (: kotlin.Any?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR ': kotlin.Any? declared in .' type=kotlin.Any? origin=null + property: PROPERTY_REFERENCE 'public final test4: @[FlexibleNullability] kotlin.Any? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Any? declared in ' setter='public final fun (: @[FlexibleNullability] kotlin.Any?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Any?> origin=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR ': @[FlexibleNullability] kotlin.Any? declared in .' type=@[FlexibleNullability] kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/declarations/kt29833.fir.kt.txt b/compiler/testData/ir/irText/declarations/kt29833.fir.kt.txt index 793d73e0144..77c33be0584 100644 --- a/compiler/testData/ir/irText/declarations/kt29833.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/kt29833.fir.kt.txt @@ -7,12 +7,13 @@ object Definitions { } - const val KT_CONSTANT: String? + const val KT_CONSTANT: @FlexibleNullability String? field = "constant" get - val ktValue: String? + val ktValue: @FlexibleNullability String? field = #CONSTANT get } + diff --git a/compiler/testData/ir/irText/declarations/kt29833.fir.txt b/compiler/testData/ir/irText/declarations/kt29833.fir.txt index 1035021a908..3f51711eddd 100644 --- a/compiler/testData/ir/irText/declarations/kt29833.fir.txt +++ b/compiler/testData/ir/irText/declarations/kt29833.fir.txt @@ -6,26 +6,26 @@ FILE fqName:interop fileName:/Definitions.kt DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Definitions modality:FINAL visibility:public superTypes:[kotlin.Any]' PROPERTY name:KT_CONSTANT visibility:public modality:FINAL [const,val] - FIELD PROPERTY_BACKING_FIELD name:KT_CONSTANT type:kotlin.String? visibility:public [final] + FIELD PROPERTY_BACKING_FIELD name:KT_CONSTANT type:@[FlexibleNullability] kotlin.String? visibility:public [final] EXPRESSION_BODY - CONST String type=kotlin.String value="constant" - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:interop.Definitions) returnType:kotlin.String? + CONST String type=@[FlexibleNullability] kotlin.String value="constant" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:interop.Definitions) returnType:@[FlexibleNullability] kotlin.String? correspondingProperty: PROPERTY name:KT_CONSTANT visibility:public modality:FINAL [const,val] $this: VALUE_PARAMETER name: type:interop.Definitions BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String? declared in interop.Definitions' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:KT_CONSTANT type:kotlin.String? visibility:public [final]' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.String? declared in interop.Definitions' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:KT_CONSTANT type:@[FlexibleNullability] kotlin.String? visibility:public [final]' type=@[FlexibleNullability] kotlin.String? origin=null receiver: GET_VAR ': interop.Definitions declared in interop.Definitions.' type=interop.Definitions origin=null PROPERTY name:ktValue visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:ktValue type:kotlin.String? visibility:private [final] + FIELD PROPERTY_BACKING_FIELD name:ktValue type:@[FlexibleNullability] kotlin.String? visibility:private [final] EXPRESSION_BODY - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:CONSTANT type:kotlin.String? visibility:public [final,static]' type=kotlin.String? origin=GET_PROPERTY - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:interop.Definitions) returnType:kotlin.String? + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:CONSTANT type:@[FlexibleNullability] kotlin.String? visibility:public [final,static]' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:interop.Definitions) returnType:@[FlexibleNullability] kotlin.String? correspondingProperty: PROPERTY name:ktValue visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:interop.Definitions BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String? declared in interop.Definitions' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ktValue type:kotlin.String? visibility:private [final]' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.String? declared in interop.Definitions' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ktValue type:@[FlexibleNullability] kotlin.String? visibility:private [final]' type=@[FlexibleNullability] kotlin.String? origin=null receiver: GET_VAR ': interop.Definitions declared in interop.Definitions.' type=interop.Definitions origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt index 34f2a1b0736..4d94cbabf83 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt @@ -12,18 +12,19 @@ fun test1() { } fun test2() { - var x: Int? + var x: @FlexibleNullability Int? val x$delegate: HashMap = hashMapOf() - local get(): Int? { - return x$delegate.getValue(thisRef = null, property = ::x) + local get(): @FlexibleNullability Int? { + return x$delegate.getValue<@FlexibleNullability Int?, @FlexibleNullability Int?>(thisRef = null, property = ::x) } - local set(: Int?) { - x$delegate.setValue(thisRef = null, property = ::x, value = ) + local set(: @FlexibleNullability Int?) { + x$delegate.setValue<@FlexibleNullability Int?>(thisRef = null, property = ::x, value = ) } ( = 0) - val : Int? = () + val : @FlexibleNullability Int? = () ( = .inc()) /*~> Unit */ ( = ().plus(other = 1)) } + diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.txt index 7a1a2afb8d1..2daa464ab27 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.txt @@ -22,39 +22,39 @@ FILE fqName: fileName:/localDelegatedProperties.kt message: CALL 'local final fun (): kotlin.Int declared in .test1' type=kotlin.Int origin=GET_LOCAL_PROPERTY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - LOCAL_DELEGATED_PROPERTY name:x type:kotlin.Int? flags:var + LOCAL_DELEGATED_PROPERTY name:x type:@[FlexibleNullability] kotlin.Int? flags:var VAR PROPERTY_DELEGATE name:x$delegate type:java.util.HashMap [val] CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections.MapsKt' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.Int? + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.Int? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int? declared in .test2' - CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Int? origin=null - : kotlin.Int? - : kotlin.Int? + RETURN type=kotlin.Nothing from='local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' + CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=@[FlexibleNullability] kotlin.Int? origin=null + : @[FlexibleNullability] kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $receiver: GET_VAR 'val x$delegate: java.util.HashMap [val] declared in .test2' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'var x: kotlin.Int? by (...)' delegate='val x$delegate: java.util.HashMap [val] declared in .test2' getter='local final fun (): kotlin.Int? declared in .test2' setter='local final fun (: kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> (:kotlin.Int?) returnType:kotlin.Unit - VALUE_PARAMETER name: index:0 type:kotlin.Int? + property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'var x: @[FlexibleNullability] kotlin.Int? by (...)' delegate='val x$delegate: java.util.HashMap [val] declared in .test2' getter='local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' setter='local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> (:@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Unit + VALUE_PARAMETER name: index:0 type:@[FlexibleNullability] kotlin.Int? BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.MapAccessorsKt.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Unit origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $receiver: GET_VAR 'val x$delegate: java.util.HashMap [val] declared in .test2' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'var x: kotlin.Int? by (...)' delegate='val x$delegate: java.util.HashMap [val] declared in .test2' getter='local final fun (): kotlin.Int? declared in .test2' setter='local final fun (: kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR ': kotlin.Int? declared in .test2.' type=kotlin.Int? origin=null - CALL 'local final fun (: kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=EQ + property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'var x: @[FlexibleNullability] kotlin.Int? by (...)' delegate='val x$delegate: java.util.HashMap [val] declared in .test2' getter='local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' setter='local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR ': @[FlexibleNullability] kotlin.Int? declared in .test2.' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=EQ : CONST Int type=kotlin.Int value=0 - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int? [val] - CALL 'local final fun (): kotlin.Int? declared in .test2' type=kotlin.Int? origin=GET_LOCAL_PROPERTY - CALL 'local final fun (: kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=EQ + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:@[FlexibleNullability] kotlin.Int? [val] + CALL 'local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' type=@[FlexibleNullability] kotlin.Int? origin=GET_LOCAL_PROPERTY + CALL 'local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=EQ : CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_0: kotlin.Int? [val] declared in .test2' type=kotlin.Int? origin=null + $this: GET_VAR 'val tmp_0: @[FlexibleNullability] kotlin.Int? [val] declared in .test2' type=@[FlexibleNullability] kotlin.Int? origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - GET_VAR 'val tmp_0: kotlin.Int? [val] declared in .test2' type=kotlin.Int? origin=null - CALL 'local final fun (: kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=EQ + GET_VAR 'val tmp_0: @[FlexibleNullability] kotlin.Int? [val] declared in .test2' type=@[FlexibleNullability] kotlin.Int? origin=null + CALL 'local final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in .test2' type=kotlin.Unit origin=EQ : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'local final fun (): kotlin.Int? declared in .test2' type=kotlin.Int? origin=GET_LOCAL_PROPERTY + $this: CALL 'local final fun (): @[FlexibleNullability] kotlin.Int? declared in .test2' type=@[FlexibleNullability] kotlin.Int? origin=GET_LOCAL_PROPERTY other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.kt.txt index da79cbe2ac8..b33525db9da 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.kt.txt @@ -37,11 +37,12 @@ val test7: Int /* by */ return #test7$delegate.getValue(thisRef = null, property = ::test7) } -var test8: Int? /* by */ +var test8: @FlexibleNullability Int? /* by */ field = hashMapOf() - get(): Int? { - return #test8$delegate.getValue(thisRef = null, property = ::test8) + get(): @FlexibleNullability Int? { + return #test8$delegate.getValue<@FlexibleNullability Int?, @FlexibleNullability Int?>(thisRef = null, property = ::test8) } - set(: Int?) { - #test8$delegate.setValue(thisRef = null, property = ::test8, value = ) + set(: @FlexibleNullability Int?) { + #test8$delegate.setValue<@FlexibleNullability Int?>(thisRef = null, property = ::test8, value = ) } + diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt index 22a1b1d408c..3a1900050f4 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt @@ -93,23 +93,23 @@ FILE fqName: fileName:/packageLevelProperties.kt CALL 'public final fun hashMapOf (): java.util.HashMap [inline] declared in kotlin.collections.MapsKt' type=java.util.HashMap origin=null : kotlin.String : kotlin.Int - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int? + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.Int? correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int? declared in ' - CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Int? origin=null - : kotlin.Int? - : kotlin.Int? + RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.Int? declared in ' + CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): V1 of kotlin.collections.MapAccessorsKt.getValue [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=@[FlexibleNullability] kotlin.Int? origin=null + : @[FlexibleNullability] kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static]' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test8: kotlin.Int? [delegated,var]' field=null getter='public final fun (): kotlin.Int? declared in ' setter='public final fun (: kotlin.Int?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE - FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int?) returnType:kotlin.Unit + property: PROPERTY_REFERENCE 'public final test8: @[FlexibleNullability] kotlin.Int? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Int? declared in ' setter='public final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE + FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] - VALUE_PARAMETER name: index:0 type:kotlin.Int? + VALUE_PARAMETER name: index:0 type:@[FlexibleNullability] kotlin.Int? BLOCK_BODY CALL 'public final fun setValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>, value: V of kotlin.collections.MapAccessorsKt.setValue): kotlin.Unit [inline,operator] declared in kotlin.collections.MapAccessorsKt' type=kotlin.Unit origin=null - : kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static]' type=java.util.HashMap origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test8: kotlin.Int? [delegated,var]' field=null getter='public final fun (): kotlin.Int? declared in ' setter='public final fun (: kotlin.Int?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR ': kotlin.Int? declared in .' type=kotlin.Int? origin=null + property: PROPERTY_REFERENCE 'public final test8: @[FlexibleNullability] kotlin.Int? [delegated,var]' field=null getter='public final fun (): @[FlexibleNullability] kotlin.Int? declared in ' setter='public final fun (: @[FlexibleNullability] kotlin.Int?): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<@[FlexibleNullability] kotlin.Int?> origin=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR ': @[FlexibleNullability] kotlin.Int? declared in .' type=@[FlexibleNullability] kotlin.Int? origin=null diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt index fa2946013ce..437aedaf264 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt @@ -137,5 +137,5 @@ FILE fqName: fileName:/breakContinueInWhen.kt arg0: GET_VAR 'var s: kotlin.String [var] declared in .testContinueDoWhile' type=kotlin.String origin=null arg1: CONST String type=kotlin.String value="1;2;" then: THROW type=kotlin.Nothing - CONSTRUCTOR_CALL 'public constructor (p0: kotlin.Any?) declared in java.lang.AssertionError' type=java.lang.AssertionError origin=null + CONSTRUCTOR_CALL 'public constructor (p0: @[FlexibleNullability] kotlin.Any?) declared in java.lang.AssertionError' type=java.lang.AssertionError origin=null p0: GET_VAR 'var s: kotlin.String [var] declared in .testContinueDoWhile' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.kt.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.kt.txt index 2d878235e87..32663ac01e9 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.kt.txt @@ -11,14 +11,14 @@ fun test2(mc: MutableCollection) { fun test3() { { // BLOCK - val tmp0_safe_receiver: PrintStream? = #out + val tmp0_safe_receiver: @FlexibleNullability PrintStream? = #out when { EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null else -> tmp0_safe_receiver.println(p0 = "Hello,") } } /*~> Unit */ { // BLOCK - val tmp1_safe_receiver: PrintStream? = #out + val tmp1_safe_receiver: @FlexibleNullability PrintStream? = #out when { EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null else -> tmp1_safe_receiver.println(p0 = "world!") diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt index 18e3854f53c..caf330547c4 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt @@ -23,31 +23,31 @@ FILE fqName: fileName:/coercionToUnit.kt BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Unit? origin=SAFE_CALL - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:java.io.PrintStream? [val] - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:@[FlexibleNullability] java.io.PrintStream? [val] + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:@[FlexibleNullability] java.io.PrintStream? visibility:public [final,static]' type=@[FlexibleNullability] java.io.PrintStream? origin=GET_PROPERTY WHEN type=kotlin.Unit? origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_0: java.io.PrintStream? [val] declared in .test3' type=java.io.PrintStream? origin=null + arg0: GET_VAR 'val tmp_0: @[FlexibleNullability] java.io.PrintStream? [val] declared in .test3' type=@[FlexibleNullability] java.io.PrintStream? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_0: java.io.PrintStream? [val] declared in .test3' type=java.io.PrintStream? origin=null + then: CALL 'public open fun println (p0: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_0: @[FlexibleNullability] java.io.PrintStream? [val] declared in .test3' type=@[FlexibleNullability] java.io.PrintStream? origin=null p0: CONST String type=kotlin.String value="Hello," TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Unit? origin=SAFE_CALL - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:java.io.PrintStream? [val] - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:@[FlexibleNullability] java.io.PrintStream? [val] + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:@[FlexibleNullability] java.io.PrintStream? visibility:public [final,static]' type=@[FlexibleNullability] java.io.PrintStream? origin=GET_PROPERTY WHEN type=kotlin.Unit? origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_1: java.io.PrintStream? [val] declared in .test3' type=java.io.PrintStream? origin=null + arg0: GET_VAR 'val tmp_1: @[FlexibleNullability] java.io.PrintStream? [val] declared in .test3' type=@[FlexibleNullability] java.io.PrintStream? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_1: java.io.PrintStream? [val] declared in .test3' type=java.io.PrintStream? origin=null + then: CALL 'public open fun println (p0: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + $this: GET_VAR 'val tmp_1: @[FlexibleNullability] java.io.PrintStream? [val] declared in .test3' type=@[FlexibleNullability] java.io.PrintStream? origin=null p0: CONST String type=kotlin.String value="world!" diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.kt.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.kt.txt index 9ab58236aa5..8cd1979ca21 100644 --- a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.kt.txt @@ -2,8 +2,8 @@ fun testKotlin(): K2 { return K1().K2() } -fun testJava(): J2 { - return J1().J2() +fun testJava(): J2<@FlexibleNullability Double?, @FlexibleNullability Int?> { + return J1<@FlexibleNullability Int?, @FlexibleNullability String?>().J2<@FlexibleNullability Double?, @FlexibleNullability CharSequence?>() } class K1 { diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt index 7092f3330e1..3a91e79430a 100644 --- a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.fir.txt @@ -6,15 +6,15 @@ FILE fqName: fileName:/constructorWithOwnTypeParametersCall.kt : kotlin.String $outer: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1' type=.K1 origin=null : kotlin.Int - FUN name:testJava visibility:public modality:FINAL <> () returnType:.J1.J2 + FUN name:testJava visibility:public modality:FINAL <> () returnType:.J1.J2<@[FlexibleNullability] kotlin.Double?, @[FlexibleNullability] kotlin.Int?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testJava (): .J1.J2 declared in ' - CONSTRUCTOR_CALL 'public constructor () declared in .J1.J2' type=.J1.J2 origin=null - : kotlin.Double? - : kotlin.CharSequence? - $outer: CONSTRUCTOR_CALL 'public constructor () declared in .J1' type=.J1 origin=null - : kotlin.Int? - : kotlin.String? + RETURN type=kotlin.Nothing from='public final fun testJava (): .J1.J2<@[FlexibleNullability] kotlin.Double?, @[FlexibleNullability] kotlin.Int?> declared in ' + CONSTRUCTOR_CALL 'public constructor () declared in .J1.J2' type=.J1.J2<@[FlexibleNullability] kotlin.Double?, @[FlexibleNullability] kotlin.Int?> origin=null + : @[FlexibleNullability] kotlin.Double? + : @[FlexibleNullability] kotlin.CharSequence? + $outer: CONSTRUCTOR_CALL 'public constructor () declared in .J1' type=.J1<@[FlexibleNullability] kotlin.Int?> origin=null + : @[FlexibleNullability] kotlin.Int? + : @[FlexibleNullability] kotlin.String? CLASS CLASS name:K1 modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K1.K1> TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Number] diff --git a/compiler/testData/ir/irText/expressions/equals.fir.txt b/compiler/testData/ir/irText/expressions/equals.fir.txt index 3685c376256..a08f512c2a4 100644 --- a/compiler/testData/ir/irText/expressions/equals.fir.txt +++ b/compiler/testData/ir/irText/expressions/equals.fir.txt @@ -19,11 +19,11 @@ FILE fqName: fileName:/equals.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testJEqeqNull (): kotlin.Boolean declared in ' CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:kotlin.Int? visibility:public [static]' type=kotlin.Int? origin=GET_PROPERTY + arg0: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:@[FlexibleNullability] kotlin.Int? visibility:public [static]' type=@[FlexibleNullability] kotlin.Int? origin=GET_PROPERTY arg1: CONST Null type=kotlin.Nothing? value=null FUN name:testJEqualsNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testJEqualsNull (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:kotlin.Int? visibility:public [static]' type=kotlin.Int? origin=GET_PROPERTY + $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:@[FlexibleNullability] kotlin.Int? visibility:public [static]' type=@[FlexibleNullability] kotlin.Int? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.fir.kt.txt b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.fir.kt.txt index 174fb1c518b..157743618e3 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.fir.kt.txt @@ -1,3 +1,3 @@ fun test(): String { - return getProperty(p0 = "test") /*!! String */ + return getProperty(p0 = "test") /*!! @FlexibleNullability String */ } diff --git a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.fir.txt index 48a7778edda..457c4ac2180 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.fir.txt @@ -2,6 +2,6 @@ FILE fqName: fileName:/implicitCastOnPlatformType.kt FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test (): kotlin.String declared in ' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun getProperty (p0: kotlin.String?): kotlin.String? declared in java.lang.System' type=kotlin.String? origin=null + TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + CALL 'public open fun getProperty (p0: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in java.lang.System' type=@[FlexibleNullability] kotlin.String? origin=null p0: CONST String type=kotlin.String value="test" diff --git a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.kt.txt b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.kt.txt index 677ce14ca8c..41cb0277b1c 100644 --- a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.kt.txt @@ -7,7 +7,7 @@ private operator fun J.component2(): Int { } fun test() { - val : J? = j() + val : @FlexibleNullability J? = j() val a: Int = .component1() - val b: Int = /*!! J */.component2() + val b: Int = /*!! @FlexibleNullability J */.component2() } diff --git a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.txt b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.txt index 69675bd72a9..4c51344a5c3 100644 --- a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.txt @@ -11,12 +11,12 @@ FILE fqName: fileName:/implicitNotNullInDestructuringAssignment.kt CONST Int type=kotlin.Int value=2 FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.J? [val] - CALL 'public open fun j (): .J? declared in .J' type=.J? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:@[FlexibleNullability] .J? [val] + CALL 'public open fun j (): @[FlexibleNullability] .J? declared in .J' type=@[FlexibleNullability] .J? origin=null VAR name:a type:kotlin.Int [val] CALL 'public final fun component1 (): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null - $receiver: GET_VAR 'val tmp_0: .J? [val] declared in .test' type=.J? origin=null + $receiver: GET_VAR 'val tmp_0: @[FlexibleNullability] .J? [val] declared in .test' type=@[FlexibleNullability] .J? origin=null VAR name:b type:kotlin.Int [val] CALL 'private final fun component2 (): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null - $receiver: TYPE_OP type=.J origin=IMPLICIT_NOTNULL typeOperand=.J - GET_VAR 'val tmp_0: .J? [val] declared in .test' type=.J? origin=null + $receiver: TYPE_OP type=@[FlexibleNullability] .J origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] .J + GET_VAR 'val tmp_0: @[FlexibleNullability] .J? [val] declared in .test' type=@[FlexibleNullability] .J? origin=null diff --git a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.fir.txt b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.fir.txt index c69ba673c96..b1342296799 100644 --- a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.fir.txt @@ -1,15 +1,15 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt FUN name:testFun visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + CALL 'public open fun println (p0: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:@[FlexibleNullability] java.io.PrintStream? visibility:public [final,static]' type=@[FlexibleNullability] java.io.PrintStream? origin=GET_PROPERTY p0: CONST String type=kotlin.String value="testFun" PROPERTY name:testProp visibility:public modality:FINAL [var] FUN name: visibility:public modality:FINAL <> () returnType:kotlin.Any correspondingProperty: PROPERTY name:testProp visibility:public modality:FINAL [var] BLOCK_BODY - CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + CALL 'public open fun println (p0: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:@[FlexibleNullability] java.io.PrintStream? visibility:public [final,static]' type=@[FlexibleNullability] java.io.PrintStream? origin=GET_PROPERTY p0: CONST String type=kotlin.String value="testProp/get" RETURN type=kotlin.Nothing from='public final fun (): kotlin.Any declared in ' CONST Int type=kotlin.Int value=42 @@ -17,8 +17,8 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt correspondingProperty: PROPERTY name:testProp visibility:public modality:FINAL [var] VALUE_PARAMETER name:value index:0 type:kotlin.Any BLOCK_BODY - CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + CALL 'public open fun println (p0: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:@[FlexibleNullability] java.io.PrintStream? visibility:public [final,static]' type=@[FlexibleNullability] java.io.PrintStream? origin=GET_PROPERTY p0: CONST String type=kotlin.String value="testProp/set" CLASS CLASS name:TestClass modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestClass @@ -33,8 +33,8 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: BLOCK type=kotlin.Int origin=null - CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + CALL 'public open fun println (p0: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:@[FlexibleNullability] java.io.PrintStream? visibility:public [final,static]' type=@[FlexibleNullability] java.io.PrintStream? origin=GET_PROPERTY p0: CONST String type=kotlin.String value="TestClass/test" CONST Int type=kotlin.Int value=42 FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestClass) returnType:kotlin.Int @@ -46,8 +46,8 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt receiver: GET_VAR ': .TestClass declared in .TestClass.' type=.TestClass origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + CALL 'public open fun println (p0: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null + $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:@[FlexibleNullability] java.io.PrintStream? visibility:public [final,static]' type=@[FlexibleNullability] java.io.PrintStream? origin=GET_PROPERTY p0: CONST String type=kotlin.String value="TestClass/init" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.kt.txt b/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.kt.txt deleted file mode 100644 index 2aeea6b4888..00000000000 --- a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.kt.txt +++ /dev/null @@ -1,47 +0,0 @@ -fun checkAny(fn: Function0): Any { - return fn.invoke() -} - -fun checkAnyN(fn: Function0): Any? { - return fn.invoke() -} - -fun checkT(fn: Function0): T { - return fn.invoke() -} - -fun checkTAny(fn: Function0): T { - return fn.invoke() -} - -fun id(x: T): T { - return x -} - -fun test1(): String? { - return checkT(fn = local fun (): String? { - return foo() - } -) -} - -fun test2(): String { - return checkT<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { - return nnFoo() - } -) /*!! String */ -} - -fun test3(): String? { - return checkTAny(fn = local fun (): String? { - return foo() - } -) -} - -fun test4(): String { - return checkTAny<@EnhancedNullability String>(fn = local fun (): @EnhancedNullability String { - return nnFoo() - } -) /*!! String */ -} diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.txt b/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.txt deleted file mode 100644 index e3d4542de79..00000000000 --- a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.txt +++ /dev/null @@ -1,75 +0,0 @@ -FILE fqName: fileName:/nullCheckOnGenericLambdaReturn.kt - FUN name:checkAny visibility:public modality:FINAL <> (fn:kotlin.Function0) returnType:kotlin.Any - VALUE_PARAMETER name:fn index:0 type:kotlin.Function0 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun checkAny (fn: kotlin.Function0): kotlin.Any declared in ' - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Any origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function0 declared in .checkAny' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION - FUN name:checkAnyN visibility:public modality:FINAL <> (fn:kotlin.Function0) returnType:kotlin.Any? - VALUE_PARAMETER name:fn index:0 type:kotlin.Function0 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun checkAnyN (fn: kotlin.Function0): kotlin.Any? declared in ' - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Any? origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function0 declared in .checkAnyN' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION - FUN name:checkT visibility:public modality:FINAL (fn:kotlin.Function0.checkT>) returnType:T of .checkT - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:fn index:0 type:kotlin.Function0.checkT> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun checkT (fn: kotlin.Function0.checkT>): T of .checkT declared in ' - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .checkT origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function0.checkT> declared in .checkT' type=kotlin.Function0.checkT> origin=VARIABLE_AS_FUNCTION - FUN name:checkTAny visibility:public modality:FINAL (fn:kotlin.Function0.checkTAny>) returnType:T of .checkTAny - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] - VALUE_PARAMETER name:fn index:0 type:kotlin.Function0.checkTAny> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun checkTAny (fn: kotlin.Function0.checkTAny>): T of .checkTAny declared in ' - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .checkTAny origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function0.checkTAny> declared in .checkTAny' type=kotlin.Function0.checkTAny> origin=VARIABLE_AS_FUNCTION - FUN name:id visibility:public modality:FINAL (x:T of .id) returnType:T of .id - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:x index:0 type:T of .id - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun id (x: T of .id): T of .id declared in ' - GET_VAR 'x: T of .id declared in .id' type=T of .id origin=null - FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.String? declared in ' - CALL 'public final fun checkT (fn: kotlin.Function0.checkT>): T of .checkT declared in ' type=kotlin.String? origin=null - : kotlin.String? - fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test1' - CALL 'public open fun foo (): kotlin.String? declared in .J' type=kotlin.String? origin=null - FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.String declared in ' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public final fun checkT (fn: kotlin.Function0.checkT>): T of .checkT declared in ' type=@[EnhancedNullability] kotlin.String origin=null - : @[EnhancedNullability] kotlin.String - fn: FUN_EXPR type=kotlin.Function0<@[EnhancedNullability] kotlin.String> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:@[EnhancedNullability] kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): @[EnhancedNullability] kotlin.String declared in .test2' - CALL 'public open fun nnFoo (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null - FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (): kotlin.String? declared in ' - CALL 'public final fun checkTAny (fn: kotlin.Function0.checkTAny>): T of .checkTAny declared in ' type=kotlin.String? origin=null - : kotlin.String? - fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test3' - CALL 'public open fun foo (): kotlin.String? declared in .J' type=kotlin.String? origin=null - FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (): kotlin.String declared in ' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public final fun checkTAny (fn: kotlin.Function0.checkTAny>): T of .checkTAny declared in ' type=@[EnhancedNullability] kotlin.String origin=null - : @[EnhancedNullability] kotlin.String - fn: FUN_EXPR type=kotlin.Function0<@[EnhancedNullability] kotlin.String> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:@[EnhancedNullability] kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): @[EnhancedNullability] kotlin.String declared in .test4' - CALL 'public open fun nnFoo (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt b/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt index 0db77324671..5387e811d9b 100644 --- a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt +++ b/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: nullCheckOnGenericLambdaReturn.kt fun checkAny(fn: () -> Any) = fn() diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.kt.txt b/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.kt.txt index a4286acb737..775ce658637 100644 --- a/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.kt.txt @@ -12,27 +12,27 @@ fun id(x: T): T { fun test1(): Any { return checkAny(fn = local fun (): Any { - return foo() /*!! String */ + return foo() /*!! @FlexibleNullability String */ } ) } val test2: Function0 - field = local fun (): String? { + field = local fun (): @FlexibleNullability String? { return foo() } get val test3: Function0 - field = local fun (): String? { + field = local fun (): @FlexibleNullability String? { return foo() } as Function0 get val test4: Function0 - field = id>(x = local fun (): String? { + field = id>(x = local fun (): @FlexibleNullability String? { return foo() } ) @@ -51,3 +51,4 @@ fun test6(): Any? { } ) } + diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.txt b/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.txt index e51da36277b..e5bb53a461d 100644 --- a/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.txt +++ b/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.txt @@ -25,16 +25,16 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Any declared in .test1' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun foo (): kotlin.String? declared in .J' type=kotlin.String? origin=null + TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null PROPERTY name:test2 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function0 visibility:private [final,static] EXPRESSION_BODY - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? + FUN_EXPR type=kotlin.Function0<@[FlexibleNullability] kotlin.String?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test2' - CALL 'public open fun foo (): kotlin.String? declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): @[FlexibleNullability] kotlin.String? declared in .test2' + CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] BLOCK_BODY @@ -44,11 +44,11 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function0 visibility:private [final,static] EXPRESSION_BODY TYPE_OP type=kotlin.Function0 origin=CAST typeOperand=kotlin.Function0 - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? + FUN_EXPR type=kotlin.Function0<@[FlexibleNullability] kotlin.String?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test3' - CALL 'public open fun foo (): kotlin.String? declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): @[FlexibleNullability] kotlin.String? declared in .test3' + CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val] BLOCK_BODY @@ -57,13 +57,13 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt PROPERTY name:test4 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Function0 visibility:private [final,static] EXPRESSION_BODY - CALL 'public final fun id (x: T of .id): T of .id declared in ' type=kotlin.Function0 origin=null - : kotlin.Function0 - x: FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? + CALL 'public final fun id (x: T of .id): T of .id declared in ' type=kotlin.Function0<@[FlexibleNullability] kotlin.String?> origin=null + : kotlin.Function0<@[FlexibleNullability] kotlin.String?> + x: FUN_EXPR type=kotlin.Function0<@[FlexibleNullability] kotlin.String?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test4' - CALL 'public open fun foo (): kotlin.String? declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): @[FlexibleNullability] kotlin.String? declared in .test4' + CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [val] BLOCK_BODY @@ -77,7 +77,7 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Any? BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Any? declared in .test5' - CALL 'public open fun foo (): kotlin.String? declared in .J' type=kotlin.String? origin=null + CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null FUN name:test6 visibility:public modality:FINAL <> () returnType:kotlin.Any? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test6 (): kotlin.Any? declared in ' diff --git a/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.fir.kt.txt index a5a20b12083..77ca4aca3f2 100644 --- a/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.fir.kt.txt @@ -6,12 +6,12 @@ fun test(fn: Function0, r: Runnable, arr: Array) { foo1(r = local fun () { return Unit } - /*-> Runnable? */, strs = [*arr]) /*~> Unit */ + /*-> @FlexibleNullability Runnable? */, strs = [*arr]) /*~> Unit */ error("") /* ErrorCallExpression */fn; arr; - foo1(r = fn /*-> Runnable? */, strs = [*arr]) /*~> Unit */ + foo1(r = fn /*-> @FlexibleNullability Runnable? */, strs = [*arr]) /*~> Unit */ foo1(r = r, strs = [""]) /*~> Unit */ error("") /* ErrorCallExpression */fn; arr; - foo1(r = fn /*-> Runnable? */, strs = [*arr]) /*~> Unit */ + foo1(r = fn /*-> @FlexibleNullability Runnable? */, strs = [*arr]) /*~> Unit */ foo1(r = r, strs = [*arr]) /*~> Unit */ val i1: ErrorType = error("") /* ErrorCallExpression */local fun () { return Unit @@ -20,7 +20,7 @@ fun test(fn: Function0, r: Runnable, arr: Array) { val i2: Test = Test(r = local fun () { return Unit } - /*-> Runnable? */, strs = [*arr]) + /*-> @FlexibleNullability Runnable? */, strs = [*arr]) val i3: ErrorType = error("") /* ErrorCallExpression */local fun () { return Unit } @@ -31,18 +31,18 @@ fun test(fn: Function0, r: Runnable, arr: Array) { val i4: Test = Test(r1 = r, r2 = local fun () { return Unit } - /*-> Runnable? */, strs = [""]) + /*-> @FlexibleNullability Runnable? */, strs = [""]) val i5: Test = Test(r1 = local fun () { return Unit } - /*-> Runnable? */, r2 = local fun () { + /*-> @FlexibleNullability Runnable? */, r2 = local fun () { return Unit } - /*-> Runnable? */, strs = [*arr]) + /*-> @FlexibleNullability Runnable? */, strs = [*arr]) val i6: Test = Test(r1 = r, r2 = local fun () { return Unit } - /*-> Runnable? */, strs = [*arr]) + /*-> @FlexibleNullability Runnable? */, strs = [*arr]) error("") /* ErrorCallExpression */local fun () { return Unit } diff --git a/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.fir.txt b/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.fir.txt index 03393bf3bec..dab9d1f3739 100644 --- a/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument.kt VALUE_PARAMETER name:r index:1 type:java.lang.Runnable VALUE_PARAMETER name:arr index:2 type:kotlin.Array BLOCK_BODY - ERROR_CALL 'Unresolved reference: #' type=kotlin.String? + ERROR_CALL 'Unresolved reference: #' type=@[FlexibleNullability] kotlin.String? FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY @@ -12,45 +12,45 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument.kt GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in .Test' type=kotlin.String? origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + CALL 'public open fun foo1 (r: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in .Test' type=@[FlexibleNullability] kotlin.String? origin=null + r: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null - ERROR_CALL 'Unresolved reference: #' type=kotlin.String? + ERROR_CALL 'Unresolved reference: #' type=@[FlexibleNullability] kotlin.String? GET_VAR 'fn: kotlin.Function0 declared in .test' type=kotlin.Function0 origin=null GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in .Test' type=kotlin.String? origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + CALL 'public open fun foo1 (r: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in .Test' type=@[FlexibleNullability] kotlin.String? origin=null + r: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? GET_VAR 'fn: kotlin.Function0 declared in .test' type=kotlin.Function0 origin=null - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in .Test' type=kotlin.String? origin=null + CALL 'public open fun foo1 (r: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in .Test' type=@[FlexibleNullability] kotlin.String? origin=null r: GET_VAR 'r: java.lang.Runnable declared in .test' type=java.lang.Runnable origin=null - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? CONST String type=kotlin.String value="" - ERROR_CALL 'Unresolved reference: #' type=kotlin.String? + ERROR_CALL 'Unresolved reference: #' type=@[FlexibleNullability] kotlin.String? GET_VAR 'fn: kotlin.Function0 declared in .test' type=kotlin.Function0 origin=null GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in .Test' type=kotlin.String? origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + CALL 'public open fun foo1 (r: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in .Test' type=@[FlexibleNullability] kotlin.String? origin=null + r: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? GET_VAR 'fn: kotlin.Function0 declared in .test' type=kotlin.Function0 origin=null - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in .Test' type=kotlin.String? origin=null + CALL 'public open fun foo1 (r: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in .Test' type=@[FlexibleNullability] kotlin.String? origin=null r: GET_VAR 'r: java.lang.Runnable declared in .test' type=java.lang.Runnable origin=null - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null VAR name:i1 type:IrErrorType(null) [val] @@ -62,14 +62,14 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument.kt GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null VAR name:i2 type:.Test [val] - CONSTRUCTOR_CALL 'public constructor (r: java.lang.Runnable?, vararg strs: kotlin.String?) declared in .Test' type=.Test origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + CONSTRUCTOR_CALL 'public constructor (r: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?) declared in .Test' type=.Test origin=null + r: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null VAR name:i3 type:IrErrorType(null) [val] @@ -86,43 +86,43 @@ FILE fqName: fileName:/arrayAsVarargAfterSamArgument.kt GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null VAR name:i4 type:.Test [val] - CONSTRUCTOR_CALL 'public constructor (r1: java.lang.Runnable?, r2: java.lang.Runnable?, vararg strs: kotlin.String?) declared in .Test' type=.Test origin=null + CONSTRUCTOR_CALL 'public constructor (r1: @[FlexibleNullability] java.lang.Runnable?, r2: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?) declared in .Test' type=.Test origin=null r1: GET_VAR 'r: java.lang.Runnable declared in .test' type=java.lang.Runnable origin=null - r2: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + r2: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? CONST String type=kotlin.String value="" VAR name:i5 type:.Test [val] - CONSTRUCTOR_CALL 'public constructor (r1: java.lang.Runnable?, r2: java.lang.Runnable?, vararg strs: kotlin.String?) declared in .Test' type=.Test origin=null - r1: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + CONSTRUCTOR_CALL 'public constructor (r1: @[FlexibleNullability] java.lang.Runnable?, r2: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?) declared in .Test' type=.Test origin=null + r1: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - r2: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + r2: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null VAR name:i6 type:.Test [val] - CONSTRUCTOR_CALL 'public constructor (r1: java.lang.Runnable?, r2: java.lang.Runnable?, vararg strs: kotlin.String?) declared in .Test' type=.Test origin=null + CONSTRUCTOR_CALL 'public constructor (r1: @[FlexibleNullability] java.lang.Runnable?, r2: @[FlexibleNullability] java.lang.Runnable?, vararg strs: @[FlexibleNullability] kotlin.String?) declared in .Test' type=.Test origin=null r1: GET_VAR 'r: java.lang.Runnable declared in .test' type=java.lang.Runnable origin=null - r2: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + r2: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - strs: VARARG type=kotlin.Array? varargElementType=kotlin.String? + strs: VARARG type=@[FlexibleNullability] kotlin.Array? varargElementType=@[FlexibleNullability] kotlin.String? SPREAD_ELEMENT GET_VAR 'arr: kotlin.Array declared in .test' type=kotlin.Array origin=null ERROR_CALL 'Unresolved reference: #' type=IrErrorType(null) diff --git a/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.kt.txt index b1b5cf221c8..7447bcb3a48 100644 --- a/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.kt.txt @@ -1,15 +1,15 @@ fun test(a: SomeJavaClass) { - a.someFunction(hello = local fun (it: String?) { + a.someFunction(hello = local fun (it: @FlexibleNullability String?) { return Unit } - /*-> Hello? */) - a.plus(hello = local fun (it: String?) { + /*-> @FlexibleNullability Hello<@FlexibleNullability String?>? */) + a.plus(hello = local fun (it: @FlexibleNullability String?) { return Unit } - /*-> Hello? */) - a.get(hello = local fun (it: String?) { + /*-> @FlexibleNullability Hello<@FlexibleNullability String?>? */) + a.get(hello = local fun (it: @FlexibleNullability String?) { return Unit } - /*-> Hello? */) + /*-> @FlexibleNullability Hello<@FlexibleNullability String?>? */) } diff --git a/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.txt b/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.txt index 9993dde4ead..f63e42ee7d5 100644 --- a/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.txt @@ -2,30 +2,30 @@ FILE fqName: fileName:/genericSamProjectedOut.kt FUN name:test visibility:public modality:FINAL <> (a:example.SomeJavaClass) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:example.SomeJavaClass BLOCK_BODY - CALL 'public open fun someFunction (hello: example.Hello?): kotlin.Unit declared in example.SomeJavaClass' type=kotlin.Unit origin=null + CALL 'public open fun someFunction (hello: @[FlexibleNullability] example.Hello<@[FlexibleNullability] A of example.SomeJavaClass?>?): kotlin.Unit declared in example.SomeJavaClass' type=kotlin.Unit origin=null $this: GET_VAR 'a: example.SomeJavaClass declared in .test' type=example.SomeJavaClass origin=null - hello: TYPE_OP type=example.Hello? origin=SAM_CONVERSION typeOperand=example.Hello? - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String?) returnType:kotlin.Unit - VALUE_PARAMETER name:it index:0 type:kotlin.String? + hello: TYPE_OP type=@[FlexibleNullability] example.Hello<@[FlexibleNullability] kotlin.String?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] example.Hello<@[FlexibleNullability] kotlin.String?>? + FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] kotlin.String?, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String?): kotlin.Unit declared in .test' + RETURN type=kotlin.Nothing from='local final fun (it: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - CALL 'public open fun plus (hello: example.Hello?): kotlin.Unit [operator] declared in example.SomeJavaClass' type=kotlin.Unit origin=PLUS + CALL 'public open fun plus (hello: @[FlexibleNullability] example.Hello<@[FlexibleNullability] A of example.SomeJavaClass?>?): kotlin.Unit [operator] declared in example.SomeJavaClass' type=kotlin.Unit origin=PLUS $this: GET_VAR 'a: example.SomeJavaClass declared in .test' type=example.SomeJavaClass origin=null - hello: TYPE_OP type=example.Hello? origin=SAM_CONVERSION typeOperand=example.Hello? - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String?) returnType:kotlin.Unit - VALUE_PARAMETER name:it index:0 type:kotlin.String? + hello: TYPE_OP type=@[FlexibleNullability] example.Hello<@[FlexibleNullability] kotlin.String?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] example.Hello<@[FlexibleNullability] kotlin.String?>? + FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] kotlin.String?, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String?): kotlin.Unit declared in .test' + RETURN type=kotlin.Nothing from='local final fun (it: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - CALL 'public open fun get (hello: example.Hello?): kotlin.Unit [operator] declared in example.SomeJavaClass' type=kotlin.Unit origin=null + CALL 'public open fun get (hello: @[FlexibleNullability] example.Hello<@[FlexibleNullability] A of example.SomeJavaClass?>?): kotlin.Unit [operator] declared in example.SomeJavaClass' type=kotlin.Unit origin=null $this: GET_VAR 'a: example.SomeJavaClass declared in .test' type=example.SomeJavaClass origin=null - hello: TYPE_OP type=example.Hello? origin=SAM_CONVERSION typeOperand=example.Hello? - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String?) returnType:kotlin.Unit - VALUE_PARAMETER name:it index:0 type:kotlin.String? + hello: TYPE_OP type=@[FlexibleNullability] example.Hello<@[FlexibleNullability] kotlin.String?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] example.Hello<@[FlexibleNullability] kotlin.String?>? + FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] kotlin.String?, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String?): kotlin.Unit declared in .test' + RETURN type=kotlin.Nothing from='local final fun (it: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.fir.kt.txt index 869b1c4a1ec..2a329293504 100644 --- a/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.fir.kt.txt @@ -1,9 +1,9 @@ fun f(x: Any): String { when { - x is A<*> -> return x /*as A<*> */.call(block = local fun (y: Any?): String? { + x is A<*> -> return x /*as A<*> */.call(block = local fun (y: Any?): @FlexibleNullability String? { return "OK" } - /*-> I? */) /*!! String */ + /*-> @FlexibleNullability I<@FlexibleNullability Any?>? */) /*!! @FlexibleNullability String */ } return "Fail" } diff --git a/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.fir.txt b/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.fir.txt index 7eefb793044..c8d985a7f98 100644 --- a/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/genericSamSmartcast.fir.txt @@ -7,16 +7,16 @@ FILE fqName: fileName:/genericSamSmartcast.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=.A<*> GET_VAR 'x: kotlin.Any declared in .f' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun f (x: kotlin.Any): kotlin.String declared in ' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun call (block: .A.I.A?>?): kotlin.String? declared in .A' type=kotlin.String? origin=null + TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + CALL 'public open fun call (block: @[FlexibleNullability] .A.I<@[FlexibleNullability] T of .A?>?): @[FlexibleNullability] kotlin.String? declared in .A' type=@[FlexibleNullability] kotlin.String? origin=null $this: TYPE_OP type=.A<*> origin=IMPLICIT_CAST typeOperand=.A<*> GET_VAR 'x: kotlin.Any declared in .f' type=kotlin.Any origin=null - block: TYPE_OP type=.A.I? origin=SAM_CONVERSION typeOperand=.A.I? - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (y:kotlin.Any?) returnType:kotlin.String? + block: TYPE_OP type=@[FlexibleNullability] .A.I<@[FlexibleNullability] kotlin.Any?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] .A.I<@[FlexibleNullability] kotlin.Any?>? + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (y:kotlin.Any?) returnType:@[FlexibleNullability] kotlin.String? VALUE_PARAMETER name:y index:0 type:kotlin.Any? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (y: kotlin.Any?): kotlin.String? declared in .f' + RETURN type=kotlin.Nothing from='local final fun (y: kotlin.Any?): @[FlexibleNullability] kotlin.String? declared in .f' CONST String type=kotlin.String value="OK" RETURN type=kotlin.Nothing from='public final fun f (x: kotlin.Any): kotlin.String declared in ' CONST String type=kotlin.String value="Fail" diff --git a/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.kt.txt index 1aeceb64953..bb67b196c0b 100644 --- a/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.kt.txt @@ -1,6 +1,7 @@ fun test1() { - bar(j = local fun (x: Any): Any? { + bar(j = local fun (x: Any): @FlexibleNullability Any? { return x } - /*-> J<*>? */) + /*-> @FlexibleNullability J<*>? */) } + diff --git a/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.txt b/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.txt index c6a4b9d1f5d..241f21e15c8 100644 --- a/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.txt @@ -1,11 +1,11 @@ FILE fqName: fileName:/samByProjectedType.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - CALL 'public open fun bar (j: .J<*>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - j: TYPE_OP type=.J<*>? origin=SAM_CONVERSION typeOperand=.J<*>? - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any? + CALL 'public open fun bar (j: @[FlexibleNullability] .J<*>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + j: TYPE_OP type=@[FlexibleNullability] .J<*>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] .J<*>? + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.Any) returnType:@[FlexibleNullability] kotlin.Any? VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (x: kotlin.Any): kotlin.Any? declared in .test1' + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.Any): @[FlexibleNullability] kotlin.Any? declared in .test1' GET_VAR 'x: kotlin.Any declared in .test1.' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.kt.txt index 0248a8a9153..4786ac266eb 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.kt.txt @@ -16,9 +16,10 @@ fun test3(): Runnable { return ::foo /*-> Runnable */ } -fun test4(): Comparator { - return local fun (a: Int?, b: Int?): Int { - return a.minus(other = b /*!! Int */) +fun test4(): Comparator<@FlexibleNullability Int?> { + return local fun (a: @FlexibleNullability Int?, b: @FlexibleNullability Int?): Int { + return a.minus(other = b /*!! @FlexibleNullability Int */) } - /*-> Comparator */ + /*-> Comparator<@FlexibleNullability Int?> */ } + diff --git a/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt index bb21c34f27d..1bee6c84bc8 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt @@ -21,17 +21,17 @@ FILE fqName: fileName:/samConstructors.kt RETURN type=kotlin.Nothing from='public final fun test3 (): java.lang.Runnable declared in ' TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION typeOperand=java.lang.Runnable FUNCTION_REFERENCE 'public final fun foo (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - FUN name:test4 visibility:public modality:FINAL <> () returnType:java.util.Comparator + FUN name:test4 visibility:public modality:FINAL <> () returnType:java.util.Comparator<@[FlexibleNullability] kotlin.Int?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (): java.util.Comparator declared in ' - TYPE_OP type=java.util.Comparator origin=SAM_CONVERSION typeOperand=java.util.Comparator - FUN_EXPR type=kotlin.Function2 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (a:kotlin.Int?, b:kotlin.Int?) returnType:kotlin.Int - VALUE_PARAMETER name:a index:0 type:kotlin.Int? - VALUE_PARAMETER name:b index:1 type:kotlin.Int? + RETURN type=kotlin.Nothing from='public final fun test4 (): java.util.Comparator<@[FlexibleNullability] kotlin.Int?> declared in ' + TYPE_OP type=java.util.Comparator<@[FlexibleNullability] kotlin.Int?> origin=SAM_CONVERSION typeOperand=java.util.Comparator<@[FlexibleNullability] kotlin.Int?> + FUN_EXPR type=kotlin.Function2<@[FlexibleNullability] kotlin.Int?, @[FlexibleNullability] kotlin.Int?, kotlin.Int> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (a:@[FlexibleNullability] kotlin.Int?, b:@[FlexibleNullability] kotlin.Int?) returnType:kotlin.Int + VALUE_PARAMETER name:a index:0 type:@[FlexibleNullability] kotlin.Int? + VALUE_PARAMETER name:b index:1 type:@[FlexibleNullability] kotlin.Int? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (a: kotlin.Int?, b: kotlin.Int?): kotlin.Int declared in .test4' + RETURN type=kotlin.Nothing from='local final fun (a: @[FlexibleNullability] kotlin.Int?, b: @[FlexibleNullability] kotlin.Int?): kotlin.Int declared in .test4' CALL 'public final fun minus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MINUS - $this: GET_VAR 'a: kotlin.Int? declared in .test4.' type=kotlin.Int? origin=null - other: TYPE_OP type=kotlin.Int origin=IMPLICIT_NOTNULL typeOperand=kotlin.Int - GET_VAR 'b: kotlin.Int? declared in .test4.' type=kotlin.Int? origin=null + $this: GET_VAR 'a: @[FlexibleNullability] kotlin.Int? declared in .test4.' type=@[FlexibleNullability] kotlin.Int? origin=null + other: TYPE_OP type=@[FlexibleNullability] kotlin.Int origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.Int + GET_VAR 'b: @[FlexibleNullability] kotlin.Int? declared in .test4.' type=@[FlexibleNullability] kotlin.Int? origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.kt.txt deleted file mode 100644 index 933ecc446f7..00000000000 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.kt.txt +++ /dev/null @@ -1,8 +0,0 @@ -fun test1(f: Function1): C { - return C(jxx = f /*-> J? */) -} - -fun test2(x: Any) { - x as Function1 /*~> Unit */ - C(jxx = x /*as Function1 */ /*-> J? */) /*~> Unit */ -} diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.txt deleted file mode 100644 index 457d1b01784..00000000000 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.fir.txt +++ /dev/null @@ -1,21 +0,0 @@ -FILE fqName: fileName:/samConversionInGenericConstructorCall.kt - FUN name:test1 visibility:public modality:FINAL <> (f:kotlin.Function1) returnType:.C - VALUE_PARAMETER name:f index:0 type:kotlin.Function1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (f: kotlin.Function1): .C declared in ' - CONSTRUCTOR_CALL 'public constructor (jxx: .J.C?, X of .C?>?) declared in .C' type=.C origin=null - : kotlin.String? - jxx: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? - GET_VAR 'f: kotlin.Function1 declared in .test1' type=kotlin.Function1 origin=null - FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Unit - VALUE_PARAMETER name:x index:0 type:kotlin.Any - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - TYPE_OP type=kotlin.Function1 origin=CAST typeOperand=kotlin.Function1 - GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Any origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CONSTRUCTOR_CALL 'public constructor (jxx: .J.C?, X of .C?>?) declared in .C' type=.C origin=null - : kotlin.String? - jxx: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? - TYPE_OP type=kotlin.Function1 origin=IMPLICIT_CAST typeOperand=kotlin.Function1 - GET_VAR 'x: kotlin.Any declared in .test2' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt index 33489add763..6f841ef686c 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +NewInference +SamConversionPerArgument +ProhibitVarargAsArrayAfterSamArgument // FILE: samConversionInGenericConstructorCall.kt fun test1(f: (String) -> String) = C(f) diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.kt.txt deleted file mode 100644 index 755e77acfeb..00000000000 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.kt.txt +++ /dev/null @@ -1,42 +0,0 @@ -fun test3(f1: Function1, f2: Function1): D { - return C(jxx = f1 /*-> J? */).D(jxy = f2 /*-> J? */) -} - -class Outer { - constructor(j11: J) /* primary */ { - super/*Any*/() - /* () */ - - } - - val j11: J - field = j11 - get - - inner class Inner { - constructor(j12: J) /* primary */ { - super/*Any*/() - /* () */ - - } - - val j12: J - field = j12 - get - - } - -} - -fun test4(f: Function1, g: Function1): Inner { - return Outer(j11 = f /*-> J */).Inner(j12 = g /*-> J */) -} - -fun testGenericJavaCtor1(f: Function1): G { - return G(x = f /*-> J? */) -} - -fun testGenericJavaCtor2(x: Any) { - x as Function1 /*~> Unit */ - G(x = x /*as Function1 */ /*-> J? */) /*~> Unit */ -} diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt deleted file mode 100644 index d2185903d91..00000000000 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.fir.txt +++ /dev/null @@ -1,114 +0,0 @@ -FILE fqName: fileName:/samConversionInGenericConstructorCall_NI.kt - FUN name:test3 visibility:public modality:FINAL <> (f1:kotlin.Function1, f2:kotlin.Function1) returnType:.C.D - VALUE_PARAMETER name:f1 index:0 type:kotlin.Function1 - VALUE_PARAMETER name:f2 index:1 type:kotlin.Function1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (f1: kotlin.Function1, f2: kotlin.Function1): .C.D declared in ' - CONSTRUCTOR_CALL 'public constructor (jxy: .J.C?, Y of .C.D?>?) declared in .C.D' type=.C.D origin=null - : kotlin.Int? - $outer: CONSTRUCTOR_CALL 'public constructor (jxx: .J.C?, X of .C?>?) declared in .C' type=.C origin=null - : kotlin.String? - jxx: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? - GET_VAR 'f1: kotlin.Function1 declared in .test3' type=kotlin.Function1 origin=null - jxy: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? - GET_VAR 'f2: kotlin.Function1 declared in .test3' type=kotlin.Function1 origin=null - CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Outer> - TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> (j11:.J.Outer, T1 of .Outer>) returnType:.Outer.Outer> [primary] - VALUE_PARAMETER name:j11 index:0 type:.J.Outer, T1 of .Outer> - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:j11 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:j11 type:.J.Outer, T1 of .Outer> visibility:private [final] - EXPRESSION_BODY - GET_VAR 'j11: .J.Outer, T1 of .Outer> declared in .Outer.' type=.J.Outer, T1 of .Outer> origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Outer.Outer>) returnType:.J.Outer, T1 of .Outer> - correspondingProperty: PROPERTY name:j11 visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Outer.Outer> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): .J.Outer, T1 of .Outer> declared in .Outer' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j11 type:.J.Outer, T1 of .Outer> visibility:private [final]' type=.J.Outer, T1 of .Outer> origin=null - receiver: GET_VAR ': .Outer.Outer> declared in .Outer.' type=.Outer.Outer> origin=null - CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> - TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?] - CONSTRUCTOR visibility:public <> ($this:.Outer.Outer>, j12:.J.Outer, T2 of .Outer.Inner>) returnType:.Outer.Inner.Outer.Inner, T1 of .Outer> [primary] - $outer: VALUE_PARAMETER name: type:.Outer.Outer> - VALUE_PARAMETER name:j12 index:0 type:.J.Outer, T2 of .Outer.Inner> - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' - PROPERTY name:j12 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:j12 type:.J.Outer, T2 of .Outer.Inner> visibility:private [final] - EXPRESSION_BODY - GET_VAR 'j12: .J.Outer, T2 of .Outer.Inner> declared in .Outer.Inner.' type=.J.Outer, T2 of .Outer.Inner> origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Outer.Inner.Outer.Inner, T1 of .Outer>) returnType:.J.Outer, T2 of .Outer.Inner> - correspondingProperty: PROPERTY name:j12 visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Outer.Inner.Outer.Inner, T1 of .Outer> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): .J.Outer, T2 of .Outer.Inner> declared in .Outer.Inner' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j12 type:.J.Outer, T2 of .Outer.Inner> visibility:private [final]' type=.J.Outer, T2 of .Outer.Inner> origin=null - receiver: GET_VAR ': .Outer.Inner.Outer.Inner, T1 of .Outer> declared in .Outer.Inner.' type=.Outer.Inner.Outer.Inner, T1 of .Outer> origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:test4 visibility:public modality:FINAL <> (f:kotlin.Function1, g:kotlin.Function1) returnType:.Outer.Inner - VALUE_PARAMETER name:f index:0 type:kotlin.Function1 - VALUE_PARAMETER name:g index:1 type:kotlin.Function1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (f: kotlin.Function1, g: kotlin.Function1): .Outer.Inner declared in ' - CONSTRUCTOR_CALL 'public constructor (j12: .J.Outer, T2 of .Outer.Inner>) [primary] declared in .Outer.Inner' type=.Outer.Inner origin=null - : kotlin.Any? - $outer: CONSTRUCTOR_CALL 'public constructor (j11: .J.Outer, T1 of .Outer>) [primary] declared in .Outer' type=.Outer origin=null - : kotlin.String? - j11: TYPE_OP type=.J origin=SAM_CONVERSION typeOperand=.J - GET_VAR 'f: kotlin.Function1 declared in .test4' type=kotlin.Function1 origin=null - j12: TYPE_OP type=.J origin=SAM_CONVERSION typeOperand=.J - GET_VAR 'g: kotlin.Function1 declared in .test4' type=kotlin.Function1 origin=null - FUN name:testGenericJavaCtor1 visibility:public modality:FINAL <> (f:kotlin.Function1) returnType:.G - VALUE_PARAMETER name:f index:0 type:kotlin.Function1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testGenericJavaCtor1 (f: kotlin.Function1): .G declared in ' - CONSTRUCTOR_CALL 'public constructor (x: .J.G.?, TClass of .G?>?) declared in .G' type=.G origin=null - : kotlin.String? - : kotlin.Int? - x: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? - GET_VAR 'f: kotlin.Function1 declared in .testGenericJavaCtor1' type=kotlin.Function1 origin=null - FUN name:testGenericJavaCtor2 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Unit - VALUE_PARAMETER name:x index:0 type:kotlin.Any - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - TYPE_OP type=kotlin.Function1 origin=CAST typeOperand=kotlin.Function1 - GET_VAR 'x: kotlin.Any declared in .testGenericJavaCtor2' type=kotlin.Any origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CONSTRUCTOR_CALL 'public constructor (x: .J.G.?, TClass of .G?>?) declared in .G' type=.G origin=null - : kotlin.String? - : kotlin.Int? - x: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? - TYPE_OP type=kotlin.Function1 origin=IMPLICIT_CAST typeOperand=kotlin.Function1 - GET_VAR 'x: kotlin.Any declared in .testGenericJavaCtor2' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt index e5b27a833d0..717f482d470 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +NewInference +SamConversionPerArgument +SamConversionForKotlinFunctions +ProhibitVarargAsArrayAfterSamArgument // FILE: samConversionInGenericConstructorCall_NI.kt fun test3( diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.kt.txt index 4a6b72912b2..5e1d3d1bff1 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.kt.txt @@ -1,51 +1,52 @@ -fun test1(): J { - return local fun (x: String?): String? { +fun test1(): J<@FlexibleNullability String?> { + return local fun (x: @FlexibleNullability String?): @FlexibleNullability String? { return x } - /*-> J */ + /*-> J<@FlexibleNullability String?> */ } -fun test2(): J { - return local fun (x: String): String? { +fun test2(): J<@FlexibleNullability String?> { + return local fun (x: String): @FlexibleNullability String? { return x } - /*-> J */ + /*-> J<@FlexibleNullability String?> */ } fun test3() { - return bar(j = local fun (x: String): String? { + return bar<@FlexibleNullability String?>(j = local fun (x: String): @FlexibleNullability String? { return x } - /*-> J? */) + /*-> @FlexibleNullability J<@FlexibleNullability String?>? */) } fun test4(a: Any) { a as J /*~> Unit */ - bar(j = a /*as J */) + bar<@FlexibleNullability String?>(j = a /*as J */) } fun test5(a: Any) { a as Function1 /*~> Unit */ - bar(j = a /*as Function1 */ /*-> J? */) + bar<@FlexibleNullability String?>(j = a /*as Function1 */ /*-> @FlexibleNullability J<@FlexibleNullability String?>? */) } fun test6(a: Function1) { - bar(j = a /*-> J? */) + bar<@FlexibleNullability T?>(j = a /*-> @FlexibleNullability J<@FlexibleNullability T?>? */) } fun test7(a: Any) { a as Function1 /*~> Unit */ - bar(j = a /*as Function1 */ /*-> J? */) + bar<@FlexibleNullability T?>(j = a /*as Function1 */ /*-> @FlexibleNullability J<@FlexibleNullability T?>? */) } -fun test8(efn: @ExtensionFunctionType Function1): J { - return efn /*-> J */ +fun test8(efn: @ExtensionFunctionType Function1): J<@FlexibleNullability String?> { + return efn /*-> J<@FlexibleNullability String?> */ } fun test9(efn: @ExtensionFunctionType Function1) { - bar(j = efn /*-> J? */) + bar<@FlexibleNullability String?>(j = efn /*-> @FlexibleNullability J<@FlexibleNullability String?>? */) } fun test10(fn: Function1) { - bar2x(j2x = fn /*-> J2X? */) + bar2x<@FlexibleNullability Int?>(j2x = fn /*-> @FlexibleNullability J2X<@FlexibleNullability Int?>? */) } + diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt index 8197321a138..c6eab1a5de8 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt @@ -1,35 +1,35 @@ FILE fqName: fileName:/samConversionToGeneric.kt - FUN name:test1 visibility:public modality:FINAL <> () returnType:.J + FUN name:test1 visibility:public modality:FINAL <> () returnType:.J<@[FlexibleNullability] kotlin.String?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (): .J declared in ' - TYPE_OP type=.J origin=SAM_CONVERSION typeOperand=.J - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String?) returnType:kotlin.String? - VALUE_PARAMETER name:x index:0 type:kotlin.String? + RETURN type=kotlin.Nothing from='public final fun test1 (): .J<@[FlexibleNullability] kotlin.String?> declared in ' + TYPE_OP type=.J<@[FlexibleNullability] kotlin.String?> origin=SAM_CONVERSION typeOperand=.J<@[FlexibleNullability] kotlin.String?> + FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] kotlin.String?, @[FlexibleNullability] kotlin.String?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:@[FlexibleNullability] kotlin.String?) returnType:@[FlexibleNullability] kotlin.String? + VALUE_PARAMETER name:x index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String?): kotlin.String? declared in .test1' - GET_VAR 'x: kotlin.String? declared in .test1.' type=kotlin.String? origin=null - FUN name:test2 visibility:public modality:FINAL <> () returnType:.J + RETURN type=kotlin.Nothing from='local final fun (x: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in .test1' + GET_VAR 'x: @[FlexibleNullability] kotlin.String? declared in .test1.' type=@[FlexibleNullability] kotlin.String? origin=null + FUN name:test2 visibility:public modality:FINAL <> () returnType:.J<@[FlexibleNullability] kotlin.String?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (): .J declared in ' - TYPE_OP type=.J origin=SAM_CONVERSION typeOperand=.J - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String) returnType:kotlin.String? + RETURN type=kotlin.Nothing from='public final fun test2 (): .J<@[FlexibleNullability] kotlin.String?> declared in ' + TYPE_OP type=.J<@[FlexibleNullability] kotlin.String?> origin=SAM_CONVERSION typeOperand=.J<@[FlexibleNullability] kotlin.String?> + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String) returnType:@[FlexibleNullability] kotlin.String? VALUE_PARAMETER name:x index:0 type:kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String): kotlin.String? declared in .test2' + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String): @[FlexibleNullability] kotlin.String? declared in .test2' GET_VAR 'x: kotlin.String declared in .test2.' type=kotlin.String origin=null FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (): kotlin.Unit declared in ' - CALL 'public open fun bar (j: .J.H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : kotlin.String? - j: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String) returnType:kotlin.String? + CALL 'public open fun bar (j: @[FlexibleNullability] .J<@[FlexibleNullability] X of .H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + : @[FlexibleNullability] kotlin.String? + j: TYPE_OP type=@[FlexibleNullability] .J<@[FlexibleNullability] kotlin.String?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] .J<@[FlexibleNullability] kotlin.String?>? + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String) returnType:@[FlexibleNullability] kotlin.String? VALUE_PARAMETER name:x index:0 type:kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String): kotlin.String? declared in .test3' + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String): @[FlexibleNullability] kotlin.String? declared in .test3' GET_VAR 'x: kotlin.String declared in .test3.' type=kotlin.String origin=null FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any @@ -37,8 +37,8 @@ FILE fqName: fileName:/samConversionToGeneric.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit TYPE_OP type=.J origin=CAST typeOperand=.J GET_VAR 'a: kotlin.Any declared in .test4' type=kotlin.Any origin=null - CALL 'public open fun bar (j: .J.H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : kotlin.String? + CALL 'public open fun bar (j: @[FlexibleNullability] .J<@[FlexibleNullability] X of .H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + : @[FlexibleNullability] kotlin.String? j: TYPE_OP type=.J origin=IMPLICIT_CAST typeOperand=.J GET_VAR 'a: kotlin.Any declared in .test4' type=kotlin.Any origin=null FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit @@ -47,18 +47,18 @@ FILE fqName: fileName:/samConversionToGeneric.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit TYPE_OP type=kotlin.Function1 origin=CAST typeOperand=kotlin.Function1 GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null - CALL 'public open fun bar (j: .J.H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : kotlin.String? - j: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? + CALL 'public open fun bar (j: @[FlexibleNullability] .J<@[FlexibleNullability] X of .H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + : @[FlexibleNullability] kotlin.String? + j: TYPE_OP type=@[FlexibleNullability] .J<@[FlexibleNullability] kotlin.String?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] .J<@[FlexibleNullability] kotlin.String?>? TYPE_OP type=kotlin.Function1 origin=IMPLICIT_CAST typeOperand=kotlin.Function1 GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null FUN name:test6 visibility:public modality:FINAL (a:kotlin.Function1.test6, T of .test6>) returnType:kotlin.Unit TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:a index:0 type:kotlin.Function1.test6, T of .test6> BLOCK_BODY - CALL 'public open fun bar (j: .J.H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : T of .test6? - j: TYPE_OP type=.J.test6?>? origin=SAM_CONVERSION typeOperand=.J.test6?>? + CALL 'public open fun bar (j: @[FlexibleNullability] .J<@[FlexibleNullability] X of .H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + : @[FlexibleNullability] T of .test6? + j: TYPE_OP type=@[FlexibleNullability] .J<@[FlexibleNullability] T of .test6?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] .J<@[FlexibleNullability] T of .test6?>? GET_VAR 'a: kotlin.Function1.test6, T of .test6> declared in .test6' type=kotlin.Function1.test6, T of .test6> origin=null FUN name:test7 visibility:public modality:FINAL (a:kotlin.Any) returnType:kotlin.Unit TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -67,28 +67,28 @@ FILE fqName: fileName:/samConversionToGeneric.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit TYPE_OP type=kotlin.Function1.test7, T of .test7> origin=CAST typeOperand=kotlin.Function1.test7, T of .test7> GET_VAR 'a: kotlin.Any declared in .test7' type=kotlin.Any origin=null - CALL 'public open fun bar (j: .J.H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : T of .test7? - j: TYPE_OP type=.J.test7?>? origin=SAM_CONVERSION typeOperand=.J.test7?>? + CALL 'public open fun bar (j: @[FlexibleNullability] .J<@[FlexibleNullability] X of .H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + : @[FlexibleNullability] T of .test7? + j: TYPE_OP type=@[FlexibleNullability] .J<@[FlexibleNullability] T of .test7?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] .J<@[FlexibleNullability] T of .test7?>? TYPE_OP type=kotlin.Function1.test7, T of .test7> origin=IMPLICIT_CAST typeOperand=kotlin.Function1.test7, T of .test7> GET_VAR 'a: kotlin.Any declared in .test7' type=kotlin.Any origin=null - FUN name:test8 visibility:public modality:FINAL <> (efn:@[ExtensionFunctionType] kotlin.Function1) returnType:.J + FUN name:test8 visibility:public modality:FINAL <> (efn:@[ExtensionFunctionType] kotlin.Function1) returnType:.J<@[FlexibleNullability] kotlin.String?> VALUE_PARAMETER name:efn index:0 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test8 (efn: @[ExtensionFunctionType] kotlin.Function1): .J declared in ' - TYPE_OP type=.J origin=SAM_CONVERSION typeOperand=.J + RETURN type=kotlin.Nothing from='public final fun test8 (efn: @[ExtensionFunctionType] kotlin.Function1): .J<@[FlexibleNullability] kotlin.String?> declared in ' + TYPE_OP type=.J<@[FlexibleNullability] kotlin.String?> origin=SAM_CONVERSION typeOperand=.J<@[FlexibleNullability] kotlin.String?> GET_VAR 'efn: @[ExtensionFunctionType] kotlin.Function1 declared in .test8' type=@[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:test9 visibility:public modality:FINAL <> (efn:@[ExtensionFunctionType] kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:efn index:0 type:@[ExtensionFunctionType] kotlin.Function1 BLOCK_BODY - CALL 'public open fun bar (j: .J.H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : kotlin.String? - j: TYPE_OP type=.J? origin=SAM_CONVERSION typeOperand=.J? + CALL 'public open fun bar (j: @[FlexibleNullability] .J<@[FlexibleNullability] X of .H.bar?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + : @[FlexibleNullability] kotlin.String? + j: TYPE_OP type=@[FlexibleNullability] .J<@[FlexibleNullability] kotlin.String?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] .J<@[FlexibleNullability] kotlin.String?>? GET_VAR 'efn: @[ExtensionFunctionType] kotlin.Function1 declared in .test9' type=@[ExtensionFunctionType] kotlin.Function1 origin=null FUN name:test10 visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY - CALL 'public open fun bar2x (j2x: .J2X.H.bar2x?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null - : kotlin.Int? - j2x: TYPE_OP type=.J2X? origin=SAM_CONVERSION typeOperand=.J2X? + CALL 'public open fun bar2x (j2x: @[FlexibleNullability] .J2X<@[FlexibleNullability] Y of .H.bar2x?>?): kotlin.Unit declared in .H' type=kotlin.Unit origin=null + : @[FlexibleNullability] kotlin.Int? + j2x: TYPE_OP type=@[FlexibleNullability] .J2X<@[FlexibleNullability] kotlin.Int?>? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] .J2X<@[FlexibleNullability] kotlin.Int?>? GET_VAR 'fn: kotlin.Function1 declared in .test10' type=kotlin.Function1 origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversions.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversions.fir.kt.txt deleted file mode 100644 index 0c781d0237f..00000000000 --- a/compiler/testData/ir/irText/expressions/sam/samConversions.fir.kt.txt +++ /dev/null @@ -1,29 +0,0 @@ -fun J.test0(a: Runnable) { - runStatic(r = a) - .runIt(r = a) -} - -fun test1() { - runStatic(r = local fun () { - test1() - } - /*-> Runnable? */) -} - -fun J.test2() { - .runIt(r = local fun () { - test1() - } - /*-> Runnable? */) -} - -fun J.test3(a: Function0) { - .run2(r1 = a /*-> Runnable? */, r2 = a /*-> Runnable? */) -} - -fun J.test4(a: Function0, b: Function0, flag: Boolean) { - .runIt(r = when { - flag -> a - else -> b - } /*-> Runnable? */) -} diff --git a/compiler/testData/ir/irText/expressions/sam/samConversions.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversions.fir.txt deleted file mode 100644 index f73745b3804..00000000000 --- a/compiler/testData/ir/irText/expressions/sam/samConversions.fir.txt +++ /dev/null @@ -1,54 +0,0 @@ -FILE fqName: fileName:/samConversions.kt - FUN name:test0 visibility:public modality:FINAL <> ($receiver:.J, a:java.lang.Runnable) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:.J - VALUE_PARAMETER name:a index:0 type:java.lang.Runnable - BLOCK_BODY - CALL 'public open fun runStatic (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - r: GET_VAR 'a: java.lang.Runnable declared in .test0' type=java.lang.Runnable origin=null - CALL 'public open fun runIt (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: GET_VAR ': .J declared in .test0' type=.J origin=null - r: GET_VAR 'a: java.lang.Runnable declared in .test0' type=java.lang.Runnable origin=null - FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public open fun runStatic (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun test1 (): kotlin.Unit declared in ' type=kotlin.Unit origin=null - FUN name:test2 visibility:public modality:FINAL <> ($receiver:.J) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:.J - BLOCK_BODY - CALL 'public open fun runIt (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: GET_VAR ': .J declared in .test2' type=.J origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun test1 (): kotlin.Unit declared in ' type=kotlin.Unit origin=null - FUN name:test3 visibility:public modality:FINAL <> ($receiver:.J, a:kotlin.Function0) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:.J - VALUE_PARAMETER name:a index:0 type:kotlin.Function0 - BLOCK_BODY - CALL 'public open fun run2 (r1: java.lang.Runnable?, r2: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: GET_VAR ': .J declared in .test3' type=.J origin=null - r1: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? - GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null - r2: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? - GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null - FUN name:test4 visibility:public modality:FINAL <> ($receiver:.J, a:kotlin.Function0, b:kotlin.Function0, flag:kotlin.Boolean) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:.J - VALUE_PARAMETER name:a index:0 type:kotlin.Function0 - VALUE_PARAMETER name:b index:1 type:kotlin.Function0 - VALUE_PARAMETER name:flag index:2 type:kotlin.Boolean - BLOCK_BODY - CALL 'public open fun runIt (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: GET_VAR ': .J declared in .test4' type=.J origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? - WHEN type=kotlin.Function0 origin=IF - BRANCH - if: GET_VAR 'flag: kotlin.Boolean declared in .test4' type=kotlin.Boolean origin=null - then: GET_VAR 'a: kotlin.Function0 declared in .test4' type=kotlin.Function0 origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'b: kotlin.Function0 declared in .test4' type=kotlin.Function0 origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversions.kt b/compiler/testData/ir/irText/expressions/sam/samConversions.kt index c8420db8188..e9272601009 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversions.kt +++ b/compiler/testData/ir/irText/expressions/sam/samConversions.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // WITH_JDK // FILE: samConversions.kt fun J.test0(a: Runnable) { diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.kt.txt index af0fe975b4a..4527300719c 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.kt.txt @@ -18,7 +18,7 @@ fun test3(a: Function0) { fun test4(a: Function0, b: Function0) { when { - a is Runnable -> J().run2(r1 = a /*as Runnable */, r2 = b /*-> Runnable? */) + a is Runnable -> J().run2(r1 = a /*as Runnable */, r2 = b /*-> @FlexibleNullability Runnable? */) } } @@ -39,19 +39,19 @@ fun test5x(a: Any) { fun test6(a: Any) { a as Function0 /*~> Unit */ - J().run1(r = a /*as Function0 */ /*-> Runnable? */) + J().run1(r = a /*as Function0 */ /*-> @FlexibleNullability Runnable? */) } fun test7(a: Function1) { a as Function0 /*~> Unit */ - J().run1(r = a /*as Function0 */ /*-> Runnable? */) + J().run1(r = a /*as Function0 */ /*-> @FlexibleNullability Runnable? */) } fun test8(a: Function0) { - J().run1(r = id?>(x = a /*-> Function0? */) /*-> Runnable? */) + J().run1(r = id<@FlexibleNullability Function0?>(x = a /*-> @FlexibleNullability Function0? */) /*-> @FlexibleNullability Runnable? */) } fun test9() { - J().run1(r = ::test9 /*-> Runnable? */) + J().run1(r = ::test9 /*-> @FlexibleNullability Runnable? */) } diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt index 78d04844292..096493a9c4a 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.fir.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test1' type=kotlin.Function0 origin=null - then: CALL 'public open fun runStatic (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + then: CALL 'public open fun runStatic (r: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test1' type=kotlin.Function0 origin=null FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit @@ -16,7 +16,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test2' type=kotlin.Function0 origin=null - then: CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + then: CALL 'public open fun run1 (r: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test2' type=kotlin.Function0 origin=null @@ -27,7 +27,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null - then: CALL 'public open fun run2 (r1: java.lang.Runnable?, r2: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + then: CALL 'public open fun run2 (r1: @[FlexibleNullability] java.lang.Runnable?, r2: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null r1: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null @@ -41,11 +41,11 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test4' type=kotlin.Function0 origin=null - then: CALL 'public open fun run2 (r1: java.lang.Runnable?, r2: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + then: CALL 'public open fun run2 (r1: @[FlexibleNullability] java.lang.Runnable?, r2: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null r1: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Function0 declared in .test4' type=kotlin.Function0 origin=null - r2: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + r2: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? GET_VAR 'b: kotlin.Function0 declared in .test4' type=kotlin.Function0 origin=null FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any @@ -54,7 +54,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null - then: CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + then: CALL 'public open fun run1 (r: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Any declared in .test5' type=kotlin.Any origin=null @@ -70,7 +70,7 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt TYPE_OP type=kotlin.Function0 origin=CAST typeOperand=kotlin.Function0 TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Any declared in .test5x' type=kotlin.Any origin=null - CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun run1 (r: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable GET_VAR 'a: kotlin.Any declared in .test5x' type=kotlin.Any origin=null @@ -80,9 +80,9 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit TYPE_OP type=kotlin.Function0 origin=CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Any declared in .test6' type=kotlin.Any origin=null - CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun run1 (r: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + r: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Any declared in .test6' type=kotlin.Any origin=null FUN name:test7 visibility:public modality:FINAL <> (a:kotlin.Function1) returnType:kotlin.Unit @@ -91,24 +91,24 @@ FILE fqName: fileName:/samConversionsWithSmartCasts.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit TYPE_OP type=kotlin.Function0 origin=CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Function1 declared in .test7' type=kotlin.Function1 origin=null - CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun run1 (r: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + r: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Function1 declared in .test7' type=kotlin.Function1 origin=null FUN name:test8 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY - CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun run1 (r: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? - CALL 'public open fun id (x: T of .J.id?): T of .J.id? declared in .J' type=kotlin.Function0? origin=null - : kotlin.Function0? - x: TYPE_OP type=kotlin.Function0? origin=SAM_CONVERSION typeOperand=kotlin.Function0? + r: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? + CALL 'public open fun id (x: @[FlexibleNullability] T of .J.id?): @[FlexibleNullability] T of .J.id? declared in .J' type=@[FlexibleNullability] kotlin.Function0? origin=null + : @[FlexibleNullability] kotlin.Function0? + x: TYPE_OP type=@[FlexibleNullability] kotlin.Function0? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] kotlin.Function0? GET_VAR 'a: kotlin.Function0 declared in .test8' type=kotlin.Function0 origin=null FUN name:test9 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun run1 (r: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .J' type=.J origin=null - r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + r: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun test9 (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= diff --git a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.kt.txt b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.kt.txt index 3ec22f65775..311a011a2d0 100644 --- a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.kt.txt @@ -2,16 +2,17 @@ fun f() { } fun J.test1() { - .get(k = ::f /*-> Runnable? */) - .get(k = ::f /*-> Runnable? */, m = ::f /*-> Runnable? */) + .get(k = ::f /*-> @FlexibleNullability Runnable? */) + .get(k = ::f /*-> @FlexibleNullability Runnable? */, m = ::f /*-> @FlexibleNullability Runnable? */) } fun J.test2() { - .set(k = ::f /*-> Runnable? */, v = ::f /*-> Runnable? */) - .set(k = ::f /*-> Runnable? */, m = ::f /*-> Runnable? */, v = ::f /*-> Runnable? */) + .set(k = ::f /*-> @FlexibleNullability Runnable? */, v = ::f /*-> @FlexibleNullability Runnable? */) + .set(k = ::f /*-> @FlexibleNullability Runnable? */, m = ::f /*-> @FlexibleNullability Runnable? */, v = ::f /*-> @FlexibleNullability Runnable? */) } fun J.test3() { - .plusAssign(i = ::f /*-> Runnable? */) - .minusAssign(i = ::f /*-> Runnable? */) + .plusAssign(i = ::f /*-> @FlexibleNullability Runnable? */) + .minusAssign(i = ::f /*-> @FlexibleNullability Runnable? */) } + diff --git a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.txt b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.txt index b0fc851b478..b0e435a267a 100644 --- a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.txt @@ -4,41 +4,41 @@ FILE fqName: fileName:/samOperators.kt FUN name:test1 visibility:public modality:FINAL <> ($receiver:.J) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.J BLOCK_BODY - CALL 'public open fun get (k: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun get (k: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null $this: GET_VAR ': .J declared in .test1' type=.J origin=null - k: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + k: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - CALL 'public open fun get (k: java.lang.Runnable?, m: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun get (k: @[FlexibleNullability] java.lang.Runnable?, m: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null $this: GET_VAR ': .J declared in .test1' type=.J origin=null - k: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + k: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - m: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + m: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= FUN name:test2 visibility:public modality:FINAL <> ($receiver:.J) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.J BLOCK_BODY - CALL 'public open fun set (k: java.lang.Runnable?, v: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun set (k: @[FlexibleNullability] java.lang.Runnable?, v: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null $this: GET_VAR ': .J declared in .test2' type=.J origin=null - k: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + k: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - v: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + v: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - CALL 'public open fun set (k: java.lang.Runnable?, m: java.lang.Runnable?, v: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun set (k: @[FlexibleNullability] java.lang.Runnable?, m: @[FlexibleNullability] java.lang.Runnable?, v: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null $this: GET_VAR ': .J declared in .test2' type=.J origin=null - k: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + k: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - m: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + m: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - v: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + v: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= FUN name:test3 visibility:public modality:FINAL <> ($receiver:.J) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.J BLOCK_BODY - CALL 'public open fun plusAssign (i: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun plusAssign (i: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null $this: GET_VAR ': .J declared in .test3' type=.J origin=null - i: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + i: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - CALL 'public open fun minusAssign (i: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun minusAssign (i: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null $this: GET_VAR ': .J declared in .test3' type=.J origin=null - i: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable? + i: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= diff --git a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt index 48b9bc61f9f..00f216f2a4c 100644 --- a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt @@ -14,7 +14,7 @@ FILE fqName: fileName:/Derived.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.Any origin=null then: BLOCK type=kotlin.Unit origin=null - SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.String? visibility:public' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:@[FlexibleNullability] kotlin.String? visibility:public' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .Derived declared in .Derived.setValue' type=.Derived origin=null value: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt index 4360aa0c2d9..1b6e8274c64 100644 --- a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt +++ b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.txt @@ -12,7 +12,7 @@ FILE fqName: fileName:/AbstractMutableMap.kt FUN name:put visibility:public modality:FINAL <> ($this:.MyMap.MyMap, V of .MyMap>, key:K of .MyMap, value:V of .MyMap) returnType:V of .MyMap? overridden: public abstract fun put (key: K of kotlin.collections.AbstractMutableMap, value: V of kotlin.collections.AbstractMutableMap): V of kotlin.collections.AbstractMutableMap? declared in kotlin.collections.AbstractMutableMap - public open fun put (p0: K of kotlin.collections.AbstractMutableMap?, p1: V of kotlin.collections.AbstractMutableMap?): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun put (p0: @[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?, p1: @[FlexibleNullability] V of kotlin.collections.AbstractMutableMap?): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:.MyMap.MyMap, V of .MyMap> VALUE_PARAMETER name:key index:0 type:K of .MyMap VALUE_PARAMETER name:value index:1 type:V of .MyMap @@ -64,24 +64,24 @@ FILE fqName: fileName:/AbstractMutableMap.kt overridden: public open fun (): kotlin.collections.MutableCollection [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap - FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.Map, p0:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?>) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.Map, p0:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:kotlin.Unit [fake_override] overridden: - public open fun replaceAll (p0: @[FlexibleNullability] java.util.function.BiFunction): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.BiFunction): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:java.util.Map - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?> - FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:V of .MyMap, p2:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?> + FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:V of .MyMap, p2:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:V of .MyMap? [fake_override] overridden: - public open fun merge (p0: K of kotlin.collections.AbstractMutableMap, p1: V of kotlin.collections.AbstractMutableMap, p2: @[FlexibleNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun merge (p0: K of kotlin.collections.AbstractMutableMap, p1: V of kotlin.collections.AbstractMutableMap, p2: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:java.util.Map VALUE_PARAMETER name:p0 index:0 type:K of .MyMap VALUE_PARAMETER name:p1 index:1 type:V of .MyMap - VALUE_PARAMETER name:p2 index:2 type:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?> - FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] + VALUE_PARAMETER name:p2 index:2 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?> + FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:V of .MyMap? [fake_override] overridden: - public open fun computeIfPresent (p0: K of kotlin.collections.AbstractMutableMap, p1: @[FlexibleNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun computeIfPresent (p0: K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:java.util.Map VALUE_PARAMETER name:p0 index:0 type:K of .MyMap - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?> + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?> FUN FAKE_OVERRIDE name:putIfAbsent visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:V of .MyMap) returnType:V of .MyMap? [fake_override] overridden: public open fun putIfAbsent (p0: K of kotlin.collections.AbstractMutableMap, p1: V of kotlin.collections.AbstractMutableMap): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap @@ -101,18 +101,18 @@ FILE fqName: fileName:/AbstractMutableMap.kt $this: VALUE_PARAMETER name: type:java.util.Map VALUE_PARAMETER name:p0 index:0 type:K of .MyMap VALUE_PARAMETER name:p1 index:1 type:V of .MyMap - FUN FAKE_OVERRIDE name:computeIfAbsent visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[FlexibleNullability] java.util.function.Function.MyMap?, out V of .MyMap?>) returnType:V of .MyMap [fake_override] + FUN FAKE_OVERRIDE name:computeIfAbsent visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[EnhancedNullability] java.util.function.Function.MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:V of .MyMap [fake_override] overridden: - public open fun computeIfAbsent (p0: K of kotlin.collections.AbstractMutableMap, p1: @[FlexibleNullability] java.util.function.Function): V of kotlin.collections.AbstractMutableMap [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun computeIfAbsent (p0: K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.Function): V of kotlin.collections.AbstractMutableMap [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:java.util.Map VALUE_PARAMETER name:p0 index:0 type:K of .MyMap - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] java.util.function.Function.MyMap?, out V of .MyMap?> - FUN FAKE_OVERRIDE name:compute visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.Function.MyMap?, out @[FlexibleNullability] V of .MyMap?> + FUN FAKE_OVERRIDE name:compute visibility:public modality:OPEN <> ($this:java.util.Map, p0:K of .MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?>) returnType:V of .MyMap? [fake_override] overridden: - public open fun compute (p0: K of kotlin.collections.AbstractMutableMap, p1: @[FlexibleNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun compute (p0: K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:java.util.Map VALUE_PARAMETER name:p0 index:0 type:K of .MyMap - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] java.util.function.BiFunction.MyMap?, in V of .MyMap?, out V of .MyMap?> + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap?, in @[FlexibleNullability] V of .MyMap?, out @[FlexibleNullability] V of .MyMap?> FUN FAKE_OVERRIDE name:containsKey visibility:public modality:OPEN <> ($this:kotlin.collections.Map, key:K of .MyMap) returnType:kotlin.Boolean [fake_override] overridden: public open fun containsKey (key: K of kotlin.collections.AbstractMutableMap): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap @@ -147,11 +147,11 @@ FILE fqName: fileName:/AbstractMutableMap.kt overridden: public open fun (): kotlin.Int [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.Map - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.Map, p0:@[FlexibleNullability] java.util.function.BiConsumer.MyMap?, in V of .MyMap?>) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.Map, p0:@[EnhancedNullability] java.util.function.BiConsumer.MyMap?, in @[FlexibleNullability] V of .MyMap?>) returnType:kotlin.Unit [fake_override] overridden: - public open fun forEach (p0: @[FlexibleNullability] java.util.function.BiConsumer): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap + public open fun forEach (p0: @[EnhancedNullability] java.util.function.BiConsumer): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:java.util.Map - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.BiConsumer.MyMap?, in V of .MyMap?> + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiConsumer.MyMap?, in @[FlexibleNullability] V of .MyMap?> FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.AbstractMutableMap @@ -165,7 +165,7 @@ FILE fqName: fileName:/AbstractMutableMap.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:clone visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Any? [fake_override] + FUN FAKE_OVERRIDE name:clone visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.AbstractMap) returnType:@[FlexibleNullability] kotlin.Any? [fake_override] overridden: - protected/*protected and package*/ open fun clone (): kotlin.Any? [fake_override] declared in kotlin.collections.AbstractMutableMap + protected/*protected and package*/ open fun clone (): @[FlexibleNullability] kotlin.Any? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:java.util.AbstractMap diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.fir.kt.txt b/compiler/testData/ir/irText/firProblems/AllCandidates.fir.kt.txt index 7b048f664b7..5ac3b9c58f6 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.fir.kt.txt @@ -20,8 +20,8 @@ class MyCandidate { } -private fun allCandidatesResult(allCandidates: Collection): OverloadResolutionResultsImpl? { - return nameNotFound().apply?>(block = local fun OverloadResolutionResultsImpl?.() { +private fun allCandidatesResult(allCandidates: Collection): @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>? { + return nameNotFound<@FlexibleNullability A?>().apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>(block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.() { .setAllCandidates(allCandidates = allCandidates.map>(transform = local fun (it: MyCandidate): ResolvedCall { return it.() as ResolvedCall } diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.fir.txt b/compiler/testData/ir/irText/firProblems/AllCandidates.fir.txt index 0d38c3105ed..6a07b6a4be9 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.fir.txt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.fir.txt @@ -50,21 +50,21 @@ FILE fqName: fileName:/AllCandidates.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:allCandidatesResult visibility:private modality:FINAL (allCandidates:kotlin.collections.Collection<.MyCandidate>) returnType:.OverloadResolutionResultsImpl.allCandidatesResult?>? + FUN name:allCandidatesResult visibility:private modality:FINAL (allCandidates:kotlin.collections.Collection<.MyCandidate>) returnType:@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:allCandidates index:0 type:kotlin.collections.Collection<.MyCandidate> BLOCK_BODY - RETURN type=kotlin.Nothing from='private final fun allCandidatesResult (allCandidates: kotlin.collections.Collection<.MyCandidate>): .OverloadResolutionResultsImpl.allCandidatesResult?>? declared in ' - CALL 'public final fun apply (block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.StandardKt.apply [inline] declared in kotlin.StandardKt' type=.OverloadResolutionResultsImpl.allCandidatesResult?>? origin=null - : .OverloadResolutionResultsImpl.allCandidatesResult?>? - $receiver: CALL 'public open fun nameNotFound (): .OverloadResolutionResultsImpl.OverloadResolutionResultsImpl.nameNotFound?>? declared in .OverloadResolutionResultsImpl' type=.OverloadResolutionResultsImpl.allCandidatesResult?>? origin=null - : A of .allCandidatesResult? - block: FUN_EXPR type=kotlin.Function1<.OverloadResolutionResultsImpl.allCandidatesResult?>?, kotlin.Unit> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.OverloadResolutionResultsImpl.allCandidatesResult?>?) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:.OverloadResolutionResultsImpl.allCandidatesResult?>? + RETURN type=kotlin.Nothing from='private final fun allCandidatesResult (allCandidates: kotlin.collections.Collection<.MyCandidate>): @[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? declared in ' + CALL 'public final fun apply (block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.StandardKt.apply [inline] declared in kotlin.StandardKt' type=@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? origin=null + : @[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? + $receiver: CALL 'public open fun nameNotFound (): @[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] R of .OverloadResolutionResultsImpl.nameNotFound?>? declared in .OverloadResolutionResultsImpl' type=@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? origin=null + : @[FlexibleNullability] A of .allCandidatesResult? + block: FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>?, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>?) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? BLOCK_BODY - CALL 'public open fun setAllCandidates (allCandidates: kotlin.collections.Collection<.ResolvedCall.OverloadResolutionResultsImpl?>?>?): kotlin.Unit declared in .OverloadResolutionResultsImpl' type=kotlin.Unit origin=EQ - $this: GET_VAR ': .OverloadResolutionResultsImpl.allCandidatesResult?>? declared in .allCandidatesResult.' type=.OverloadResolutionResultsImpl.allCandidatesResult?>? origin=null + CALL 'public open fun setAllCandidates (allCandidates: @[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] .ResolvedCall<@[FlexibleNullability] D of .OverloadResolutionResultsImpl?>?>?): kotlin.Unit declared in .OverloadResolutionResultsImpl' type=kotlin.Unit origin=EQ + $this: GET_VAR ': @[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? declared in .allCandidatesResult.' type=@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? origin=null allCandidates: CALL 'public final fun map (transform: kotlin.Function1): kotlin.collections.List [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<.ResolvedCall.allCandidatesResult>> origin=null : .MyCandidate : .ResolvedCall.allCandidatesResult> diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.txt index a83ecfba126..1cd7ba66e09 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.txt @@ -152,7 +152,7 @@ FILE fqName: fileName:/ClashResolutionDescriptor.kt BLOCK type=kotlin.collections.Collection<.ComponentDescriptor> origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.Collection<.ComponentDescriptor>? [val] TYPE_OP type=kotlin.collections.Collection<.ComponentDescriptor>? origin=SAFE_CAST typeOperand=kotlin.collections.Collection<.ComponentDescriptor> - CALL 'public open fun get (p0: @[FlexibleNullability] K of java.util.HashMap?): @[FlexibleNullability] V of java.util.HashMap? [operator] declared in java.util.HashMap' type=kotlin.Any? origin=null + CALL 'public open fun get (p0: @[FlexibleNullability] K of java.util.HashMap?): @[EnhancedNullability] V of java.util.HashMap? [operator] declared in java.util.HashMap' type=kotlin.Any? origin=null $this: CALL 'private final fun (): java.util.HashMap declared in ' type=java.util.HashMap origin=GET_PROPERTY p0: CALL 'public final fun (): java.lang.Class.PlatformExtensionsClashResolver> declared in .PlatformExtensionsClashResolver' type=java.lang.Class.PlatformSpecificExtension.PlatformSpecificExtension.PlatformSpecificExtension.PlatformSpecificExtension.PlatformSpecificExtension>>>>> origin=GET_PROPERTY $this: GET_VAR 'val resolver: .PlatformExtensionsClashResolver<*> [val] declared in .resolveClashesIfAny' type=.PlatformExtensionsClashResolver<*> origin=null diff --git a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.kt.txt b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.kt.txt index bc666aded76..b68c1a58e31 100644 --- a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.kt.txt @@ -5,11 +5,11 @@ class Impl : A, B { } - override fun add(element: String?): Boolean { + override fun add(element: @FlexibleNullability String?): Boolean { return .#<$$delegate_0>.add(element = element) } - override fun addAll(elements: Collection): Boolean { + override fun addAll(elements: Collection<@FlexibleNullability String?>): Boolean { return .#<$$delegate_0>.addAll(elements = elements) } @@ -17,27 +17,27 @@ class Impl : A, B { .#<$$delegate_0>.clear() } - override operator fun iterator(): MutableIterator { + override operator fun iterator(): MutableIterator<@FlexibleNullability String?> { return .#<$$delegate_0>.iterator() } - override fun remove(element: String?): Boolean { + override fun remove(element: @FlexibleNullability String?): Boolean { return .#<$$delegate_0>.remove(element = element) } - override fun removeAll(elements: Collection): Boolean { + override fun removeAll(elements: Collection<@FlexibleNullability String?>): Boolean { return .#<$$delegate_0>.removeAll(elements = elements) } - override fun retainAll(elements: Collection): Boolean { + override fun retainAll(elements: Collection<@FlexibleNullability String?>): Boolean { return .#<$$delegate_0>.retainAll(elements = elements) } - override operator fun contains(element: String?): Boolean { + override operator fun contains(element: @FlexibleNullability String?): Boolean { return .#<$$delegate_0>.contains(element = element) } - override fun containsAll(elements: Collection): Boolean { + override fun containsAll(elements: Collection<@FlexibleNullability String?>): Boolean { return .#<$$delegate_0>.containsAll(elements = elements) } @@ -57,3 +57,4 @@ class Impl : A, B { fun box(): String { return "OK" } + diff --git a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt index c3f06d5448d..ca7152613f3 100644 --- a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt +++ b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt @@ -6,28 +6,28 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Impl modality:FINAL visibility:public superTypes:[.Foo.A; .Foo.B]' - FUN DELEGATED_MEMBER name:add visibility:public modality:OPEN <> ($this:.Impl, element:kotlin.String?) returnType:kotlin.Boolean + FUN DELEGATED_MEMBER name:add visibility:public modality:OPEN <> ($this:.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean overridden: - public abstract fun add (element: kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun add (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.A $this: VALUE_PARAMETER name: type:.Impl - VALUE_PARAMETER name:element index:0 type:kotlin.String? + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun add (element: kotlin.String?): kotlin.Boolean declared in .Impl' - CALL 'public abstract fun add (element: kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null + RETURN type=kotlin.Nothing from='public open fun add (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean declared in .Impl' + CALL 'public abstract fun add (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.add' type=.Impl origin=null - element: GET_VAR 'element: kotlin.String? declared in .Impl.add' type=kotlin.String? origin=null - FUN DELEGATED_MEMBER name:addAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection) returnType:kotlin.Boolean + element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in .Impl.add' type=@[FlexibleNullability] kotlin.String? origin=null + FUN DELEGATED_MEMBER name:addAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean overridden: - public abstract fun addAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun addAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.A $this: VALUE_PARAMETER name: type:.Impl - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun addAll (elements: kotlin.collections.Collection): kotlin.Boolean declared in .Impl' - CALL 'public abstract fun addAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null + RETURN type=kotlin.Nothing from='public open fun addAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean declared in .Impl' + CALL 'public abstract fun addAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.addAll' type=.Impl origin=null - elements: GET_VAR 'elements: kotlin.collections.Collection declared in .Impl.addAll' type=kotlin.collections.Collection origin=null + elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in .Impl.addAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null FUN DELEGATED_MEMBER name:clear visibility:public modality:OPEN <> ($this:.Impl) returnType:kotlin.Unit overridden: public abstract fun clear (): kotlin.Unit [fake_override] declared in .Foo.A @@ -37,70 +37,70 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt CALL 'public abstract fun clear (): kotlin.Unit declared in kotlin.collections.MutableSet' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.clear' type=.Impl origin=null - FUN DELEGATED_MEMBER name:iterator visibility:public modality:OPEN <> ($this:.Impl) returnType:kotlin.collections.MutableIterator [operator] + FUN DELEGATED_MEMBER name:iterator visibility:public modality:OPEN <> ($this:.Impl) returnType:kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [operator] overridden: - public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in .Foo.A + public abstract fun iterator (): kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [fake_override,operator] declared in .Foo.A $this: VALUE_PARAMETER name: type:.Impl BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun iterator (): kotlin.collections.MutableIterator [operator] declared in .Impl' - CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in .Foo.B' type=kotlin.collections.MutableIterator origin=null + RETURN type=kotlin.Nothing from='public open fun iterator (): kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [operator] declared in .Impl' + CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> [fake_override,operator] declared in .Foo.B' type=kotlin.collections.MutableIterator<@[FlexibleNullability] kotlin.String?> origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.iterator' type=.Impl origin=null - FUN DELEGATED_MEMBER name:remove visibility:public modality:OPEN <> ($this:.Impl, element:kotlin.String?) returnType:kotlin.Boolean + FUN DELEGATED_MEMBER name:remove visibility:public modality:OPEN <> ($this:.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean overridden: - public abstract fun remove (element: kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun remove (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.A $this: VALUE_PARAMETER name: type:.Impl - VALUE_PARAMETER name:element index:0 type:kotlin.String? + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun remove (element: kotlin.String?): kotlin.Boolean declared in .Impl' - CALL 'public abstract fun remove (element: kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null + RETURN type=kotlin.Nothing from='public open fun remove (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean declared in .Impl' + CALL 'public abstract fun remove (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.remove' type=.Impl origin=null - element: GET_VAR 'element: kotlin.String? declared in .Impl.remove' type=kotlin.String? origin=null - FUN DELEGATED_MEMBER name:removeAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection) returnType:kotlin.Boolean + element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in .Impl.remove' type=@[FlexibleNullability] kotlin.String? origin=null + FUN DELEGATED_MEMBER name:removeAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean overridden: - public abstract fun removeAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.A $this: VALUE_PARAMETER name: type:.Impl - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun removeAll (elements: kotlin.collections.Collection): kotlin.Boolean declared in .Impl' - CALL 'public abstract fun removeAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null + RETURN type=kotlin.Nothing from='public open fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean declared in .Impl' + CALL 'public abstract fun removeAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.removeAll' type=.Impl origin=null - elements: GET_VAR 'elements: kotlin.collections.Collection declared in .Impl.removeAll' type=kotlin.collections.Collection origin=null - FUN DELEGATED_MEMBER name:retainAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection) returnType:kotlin.Boolean + elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in .Impl.removeAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null + FUN DELEGATED_MEMBER name:retainAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean overridden: - public abstract fun retainAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.A $this: VALUE_PARAMETER name: type:.Impl - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun retainAll (elements: kotlin.collections.Collection): kotlin.Boolean declared in .Impl' - CALL 'public abstract fun retainAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null + RETURN type=kotlin.Nothing from='public open fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean declared in .Impl' + CALL 'public abstract fun retainAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.retainAll' type=.Impl origin=null - elements: GET_VAR 'elements: kotlin.collections.Collection declared in .Impl.retainAll' type=kotlin.collections.Collection origin=null - FUN DELEGATED_MEMBER name:contains visibility:public modality:OPEN <> ($this:.Impl, element:kotlin.String?) returnType:kotlin.Boolean [operator] + elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in .Impl.retainAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null + FUN DELEGATED_MEMBER name:contains visibility:public modality:OPEN <> ($this:.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean [operator] overridden: - public abstract fun contains (element: kotlin.String?): kotlin.Boolean [fake_override,operator] declared in .Foo.A + public abstract fun contains (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override,operator] declared in .Foo.A $this: VALUE_PARAMETER name: type:.Impl - VALUE_PARAMETER name:element index:0 type:kotlin.String? + VALUE_PARAMETER name:element index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun contains (element: kotlin.String?): kotlin.Boolean [operator] declared in .Impl' - CALL 'public abstract fun contains (element: kotlin.String?): kotlin.Boolean [fake_override,operator] declared in .Foo.B' type=kotlin.Boolean origin=null + RETURN type=kotlin.Nothing from='public open fun contains (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [operator] declared in .Impl' + CALL 'public abstract fun contains (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override,operator] declared in .Foo.B' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.contains' type=.Impl origin=null - element: GET_VAR 'element: kotlin.String? declared in .Impl.contains' type=kotlin.String? origin=null - FUN DELEGATED_MEMBER name:containsAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection) returnType:kotlin.Boolean + element: GET_VAR 'element: @[FlexibleNullability] kotlin.String? declared in .Impl.contains' type=@[FlexibleNullability] kotlin.String? origin=null + FUN DELEGATED_MEMBER name:containsAll visibility:public modality:OPEN <> ($this:.Impl, elements:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>) returnType:kotlin.Boolean overridden: - public abstract fun containsAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.A $this: VALUE_PARAMETER name: type:.Impl - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun containsAll (elements: kotlin.collections.Collection): kotlin.Boolean declared in .Impl' - CALL 'public abstract fun containsAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null + RETURN type=kotlin.Nothing from='public open fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean declared in .Impl' + CALL 'public abstract fun containsAll (elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?>): kotlin.Boolean [fake_override] declared in .Foo.B' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.containsAll' type=.Impl origin=null - elements: GET_VAR 'elements: kotlin.collections.Collection declared in .Impl.containsAll' type=kotlin.collections.Collection origin=null + elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in .Impl.containsAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null FUN DELEGATED_MEMBER name:isEmpty visibility:public modality:OPEN <> ($this:.Impl) returnType:kotlin.Boolean overridden: public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in .Foo.A diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt index f3d1264270e..470e4b2bfea 100644 --- a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.txt @@ -109,14 +109,14 @@ FILE fqName: fileName:/ImplicitReceiverStack.kt overridden: public abstract fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterable $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.ImplicitReceiverValue<*>?>?) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable $this: VALUE_PARAMETER name: type:java.lang.Iterable - VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.ImplicitReceiverValue<*>?>? - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.lang.Iterable) returnType:@[FlexibleNullability] java.util.Spliterator<.ImplicitReceiverValue<*>?> [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>? + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.lang.Iterable) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .ImplicitReceiverValue<*>?> [fake_override] overridden: - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.lang.Iterable + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] T of java.lang.Iterable?> declared in java.lang.Iterable $this: VALUE_PARAMETER name: type:java.lang.Iterable FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -170,16 +170,16 @@ FILE fqName: fileName:/ImplicitReceiverStack.kt : .ImplicitReceiverValue<*> $receiver: CALL 'private final fun (): kotlin.collections.List<.ImplicitReceiverValue<*>> declared in .PersistentImplicitReceiverStack' type=kotlin.collections.List<.ImplicitReceiverValue<*>> origin=GET_PROPERTY $this: GET_VAR ': .PersistentImplicitReceiverStack declared in .PersistentImplicitReceiverStack.get' type=.PersistentImplicitReceiverStack origin=null - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.ImplicitReceiverValue<*>?>?) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun forEach (p0: java.util.function.Consumer.ImplicitReceiverValue<*>?>?): kotlin.Unit [fake_override] declared in .ImplicitReceiverStack - public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>?): kotlin.Unit [fake_override] declared in .ImplicitReceiverStack + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable $this: VALUE_PARAMETER name: type:java.lang.Iterable - VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.ImplicitReceiverValue<*>?>? - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.lang.Iterable) returnType:@[FlexibleNullability] java.util.Spliterator<.ImplicitReceiverValue<*>?> [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.ImplicitReceiverValue<*>?>? + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.lang.Iterable) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .ImplicitReceiverValue<*>?> [fake_override] overridden: - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator<.ImplicitReceiverValue<*>?> [fake_override] declared in .ImplicitReceiverStack - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.lang.Iterable + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .ImplicitReceiverValue<*>?> [fake_override] declared in .ImplicitReceiverStack + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] T of java.lang.Iterable?> declared in java.lang.Iterable $this: VALUE_PARAMETER name: type:java.lang.Iterable FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/firProblems/JCTree.fir.kt.txt b/compiler/testData/ir/irText/firProblems/JCTree.fir.kt.txt index f62bcb560c9..1c83ead98e0 100644 --- a/compiler/testData/ir/irText/firProblems/JCTree.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/JCTree.fir.kt.txt @@ -13,7 +13,7 @@ class Owner { get(): String { var tree: JCTree = .() when { - tree /*as T */ is JCTypeApply -> return tree /*as T */ /*as JCTypeApply */.#clazz /*!! String */ + tree /*as T */ is JCTypeApply -> return tree /*as T */ /*as JCTypeApply */.#clazz /*!! @FlexibleNullability String */ } return "" } diff --git a/compiler/testData/ir/irText/firProblems/JCTree.fir.txt b/compiler/testData/ir/irText/firProblems/JCTree.fir.txt index 1c25e130956..c801cbbe1fc 100644 --- a/compiler/testData/ir/irText/firProblems/JCTree.fir.txt +++ b/compiler/testData/ir/irText/firProblems/JCTree.fir.txt @@ -32,8 +32,8 @@ FILE fqName: fileName:/JCTreeUser.kt TYPE_OP type=T of .Owner origin=IMPLICIT_CAST typeOperand=T of .Owner GET_VAR 'var tree: .JCTree [var] declared in .Owner.' type=.JCTree origin=null then: RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Owner' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:clazz type:kotlin.String? visibility:public' type=kotlin.String? origin=GET_PROPERTY + TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:clazz type:@[FlexibleNullability] kotlin.String? visibility:public' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY receiver: TYPE_OP type=.JCTree.JCTypeApply origin=IMPLICIT_CAST typeOperand=.JCTree.JCTypeApply TYPE_OP type=T of .Owner origin=IMPLICIT_CAST typeOperand=T of .Owner GET_VAR 'var tree: .JCTree [var] declared in .Owner.' type=.JCTree origin=null diff --git a/compiler/testData/ir/irText/firProblems/Modality.fir.txt b/compiler/testData/ir/irText/firProblems/Modality.fir.txt index 74070a9e7d3..f2fcd65fe34 100644 --- a/compiler/testData/ir/irText/firProblems/Modality.fir.txt +++ b/compiler/testData/ir/irText/firProblems/Modality.fir.txt @@ -123,7 +123,7 @@ FILE fqName: fileName:/Modality.kt GET_VAR 'val candidateDescriptor: .CallableDescriptor [val] declared in .Owner.process' type=.CallableDescriptor origin=null then: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public abstract fun getModality (): .Modality? declared in .MemberDescriptor' type=.Modality? origin=GET_PROPERTY + arg0: CALL 'public abstract fun getModality (): @[FlexibleNullability] .Modality? declared in .MemberDescriptor' type=@[FlexibleNullability] .Modality? origin=GET_PROPERTY $this: TYPE_OP type=.MemberDescriptor origin=IMPLICIT_CAST typeOperand=.MemberDescriptor GET_VAR 'val candidateDescriptor: .CallableDescriptor [val] declared in .Owner.process' type=.CallableDescriptor origin=null arg1: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/firProblems/MultiList.fir.txt b/compiler/testData/ir/irText/firProblems/MultiList.fir.txt index 20fd8d991f2..9e551765d8d 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.fir.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.fir.txt @@ -156,23 +156,23 @@ FILE fqName: fileName:/MultiList.kt overridden: public abstract fun (): kotlin.Int declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.Spliterator<.Some.MyList>?> [fake_override] + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.MyList>?> [fake_override] overridden: - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.util.Collection + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] E of java.util.Collection?> declared in java.util.Collection $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some.MyList>?> [fake_override] + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.MyList>?> [fake_override] overridden: - public open fun parallelStream (): @[FlexibleNullability] java.util.stream.Stream declared in java.util.Collection + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.Collection?> declared in java.util.Collection $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some.MyList>?> [fake_override] + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.MyList>?> [fake_override] overridden: - public open fun stream (): @[FlexibleNullability] java.util.stream.Stream declared in java.util.Collection + public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.Collection?> declared in java.util.Collection $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.Some.MyList>?>?) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.Some.MyList>?>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit declared in java.lang.Iterable $this: VALUE_PARAMETER name: type:java.lang.Iterable - VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.Some.MyList>?>? + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some.MyList>?>? FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -209,7 +209,7 @@ FILE fqName: fileName:/MultiList.kt FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:kotlin.collections.List, index:kotlin.Int) returnType:.Some.SomeList> [fake_override,operator] overridden: public abstract fun get (index: kotlin.Int): .Some.MyList> [fake_override,operator] declared in .MyList - public open fun get (p0: kotlin.Int): E of java.util.ArrayList? [operator] declared in java.util.ArrayList + public open fun get (p0: kotlin.Int): @[FlexibleNullability] E of java.util.ArrayList? [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:index index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:indexOf visibility:public modality:OPEN <> ($this:kotlin.collections.List, element:.Some.SomeList>) returnType:kotlin.Int [fake_override] @@ -223,10 +223,10 @@ FILE fqName: fileName:/MultiList.kt public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in .MyList public open fun isEmpty (): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.collections.MutableIterator<.Some.SomeList>?> [fake_override,operator] + FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override,operator] overridden: public abstract fun iterator (): kotlin.collections.Iterator<.Some.MyList>> [fake_override,operator] declared in .MyList - public open fun iterator (): @[FlexibleNullability] kotlin.collections.MutableIterator [operator] declared in java.util.ArrayList + public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] E of java.util.ArrayList?> [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:kotlin.collections.List, element:.Some.SomeList>) returnType:kotlin.Int [fake_override] overridden: @@ -234,21 +234,21 @@ FILE fqName: fileName:/MultiList.kt public open fun lastIndexOf (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:element index:0 type:.Some.SomeList> - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.collections.MutableListIterator<.Some.SomeList>?> [fake_override] + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: public abstract fun listIterator (): kotlin.collections.ListIterator<.Some.MyList>> [fake_override] declared in .MyList - public open fun listIterator (): @[FlexibleNullability] kotlin.collections.MutableListIterator declared in java.util.ArrayList + public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] kotlin.collections.MutableListIterator<.Some.SomeList>?> [fake_override] + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: public abstract fun listIterator (index: kotlin.Int): kotlin.collections.ListIterator<.Some.MyList>> [fake_override] declared in .MyList - public open fun listIterator (p0: kotlin.Int): @[FlexibleNullability] kotlin.collections.MutableListIterator declared in java.util.ArrayList + public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[FlexibleNullability] kotlin.collections.MutableList<.Some.SomeList>?> [fake_override] + FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: public abstract fun subList (fromIndex: kotlin.Int, toIndex: kotlin.Int): kotlin.collections.List<.Some.MyList>> [fake_override] declared in .MyList - public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[FlexibleNullability] kotlin.collections.MutableList declared in java.util.ArrayList + public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int @@ -259,31 +259,31 @@ FILE fqName: fileName:/MultiList.kt public abstract fun (): kotlin.Int [fake_override] declared in .MyList public open fun (): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.Spliterator<.Some.SomeList>?> [fake_override] + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator<.Some.MyList>?> [fake_override] declared in .MyList - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator declared in java.util.ArrayList + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.MyList>?> [fake_override] declared in .MyList + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some.SomeList>?> [fake_override] + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: - public open fun parallelStream (): @[FlexibleNullability] java.util.stream.Stream<.Some.MyList>?> [fake_override] declared in .MyList - public open fun parallelStream (): @[FlexibleNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.MyList>?> [fake_override] declared in .MyList + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some.SomeList>?> [fake_override] + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: - public open fun stream (): @[FlexibleNullability] java.util.stream.Stream<.Some.MyList>?> [fake_override] declared in .MyList - public open fun stream (): @[FlexibleNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList + public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.MyList>?> [fake_override] declared in .MyList + public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun forEach (p0: java.util.function.Consumer.Some.MyList>?>?): kotlin.Unit [fake_override] declared in .MyList - public open fun forEach (p0: java.util.function.Consumer?): kotlin.Unit declared in java.util.ArrayList + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer.Some.MyList>?>?): kotlin.Unit [fake_override] declared in .MyList + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.lang.Iterable - VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.Some.SomeList>?>? + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>? FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .MyList - public open fun equals (p0: @[FlexibleNullability] kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in java.util.ArrayList + public open fun equals (p0: @[EnhancedNullability] kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:other index:0 type:kotlin.Any? FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] @@ -294,11 +294,11 @@ FILE fqName: fileName:/MultiList.kt FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: public open fun toString (): kotlin.String [fake_override] declared in .MyList - public open fun toString (): @[FlexibleNullability] kotlin.String [fake_override] declared in java.util.ArrayList + public open fun toString (): @[EnhancedNullability] kotlin.String [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:elementData visibility:public/*package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:.Some.SomeList>? [fake_override] + FUN FAKE_OVERRIDE name:elementData visibility:public/*package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override] overridden: - public/*package*/ open fun elementData (p0: kotlin.Int): E of java.util.ArrayList? declared in java.util.ArrayList + public/*package*/ open fun elementData (p0: kotlin.Int): @[FlexibleNullability] E of java.util.ArrayList? declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:trimToSize visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] @@ -310,91 +310,91 @@ FILE fqName: fileName:/MultiList.kt public open fun ensureCapacity (p0: kotlin.Int): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:clone visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Any [fake_override] + FUN FAKE_OVERRIDE name:clone visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.Any [fake_override] overridden: - public open fun clone (): @[FlexibleNullability] kotlin.Any declared in java.util.ArrayList + public open fun clone (): @[EnhancedNullability] kotlin.Any declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Array? [fake_override] + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] overridden: - public open fun toArray (): kotlin.Array? declared in java.util.ArrayList + public open fun toArray (): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:kotlin.Array.SomeList.toArray?>?) returnType:kotlin.Array.SomeList.toArray?>? [fake_override] + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>?) returnType:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>? [fake_override] overridden: - public open fun toArray (p0: kotlin.Array?): kotlin.Array? declared in java.util.ArrayList - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + public open fun toArray (p0: @[FlexibleNullability] kotlin.Array?): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList + TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.Array.SomeList.toArray?>? - FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:.Some.SomeList>?) returnType:.Some.SomeList>? [fake_override,operator] + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>? + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] .Some.SomeList>?) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override,operator] overridden: - public open fun set (p0: kotlin.Int, p1: E of java.util.ArrayList?): E of java.util.ArrayList? [operator] declared in java.util.ArrayList + public open fun set (p0: kotlin.Int, p1: @[FlexibleNullability] E of java.util.ArrayList?): @[FlexibleNullability] E of java.util.ArrayList? [operator] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:.Some.SomeList>? - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some.SomeList>?) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] .Some.SomeList>? + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Boolean [fake_override] overridden: - public open fun add (p0: E of java.util.ArrayList?): kotlin.Boolean declared in java.util.ArrayList + public open fun add (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:.Some.SomeList>? - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:.Some.SomeList>?) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun add (p0: kotlin.Int, p1: E of java.util.ArrayList?): kotlin.Unit declared in java.util.ArrayList + public open fun add (p0: kotlin.Int, p1: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:.Some.SomeList>? - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some.SomeList>?) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] .Some.SomeList>? + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some.SomeList>?) returnType:kotlin.Boolean [fake_override] overridden: public open fun remove (p0: @[FlexibleNullability] E of java.util.ArrayList?): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:.Some.SomeList>? + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some.SomeList>? FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] overridden: public open fun clear (): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.collections.Collection.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun addAll (p0: @[FlexibleNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList + public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.collections.Collection.Some.SomeList>?> - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] kotlin.collections.Collection.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun addAll (p0: kotlin.Int, p1: @[FlexibleNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList + public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] kotlin.collections.Collection.Some.SomeList>?> + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?> FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] overridden: protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] overridden: public open fun removeAll (p0: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some.SomeList>?> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] overridden: public open fun retainAll (p0: kotlin.collections.Collection<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some.SomeList>?> - FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.Predicate.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?> + FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeIf (p0: @[FlexibleNullability] java.util.function.Predicate): kotlin.Boolean declared in java.util.ArrayList + public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate): kotlin.Boolean declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Predicate.Some.SomeList>?> - FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.UnaryOperator<.Some.SomeList>?>) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>?> + FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some.SomeList>?>) returnType:kotlin.Unit [fake_override] overridden: - public open fun replaceAll (p0: @[FlexibleNullability] java.util.function.UnaryOperator): kotlin.Unit declared in java.util.ArrayList + public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] E of java.util.ArrayList?>): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.UnaryOperator<.Some.SomeList>?> - FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:java.util.Comparator.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some.SomeList>?> + FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.Comparator.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun sort (p0: java.util.Comparator?): kotlin.Unit declared in java.util.ArrayList + public open fun sort (p0: @[FlexibleNullability] java.util.Comparator?): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:java.util.Comparator.Some.SomeList>?>? - FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:.Some.SomeList>? [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator.Some.SomeList>?>? + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override] overridden: - public open fun removeAt (p0: kotlin.Int): E of java.util.ArrayList? declared in java.util.ArrayList + public open fun removeAt (p0: kotlin.Int): @[FlexibleNullability] E of java.util.ArrayList? declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int CLASS CLASS name:FinalList modality:FINAL visibility:public superTypes:[.SomeList] @@ -428,27 +428,27 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun isEmpty (): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.collections.MutableIterator<.Some?> [fake_override,operator] + FUN FAKE_OVERRIDE name:iterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] .Some?> [fake_override,operator] overridden: - public open fun iterator (): @[FlexibleNullability] kotlin.collections.MutableIterator<.Some.SomeList>?> [fake_override,operator] declared in .SomeList + public open fun iterator (): @[EnhancedNullability] kotlin.collections.MutableIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override,operator] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:OPEN <> ($this:kotlin.collections.List, element:.Some) returnType:kotlin.Int [fake_override] overridden: public open fun lastIndexOf (element: .Some.SomeList>): kotlin.Int [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:element index:0 type:.Some - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.collections.MutableListIterator<.Some?> [fake_override] + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some?> [fake_override] overridden: - public open fun listIterator (): @[FlexibleNullability] kotlin.collections.MutableListIterator<.Some.SomeList>?> [fake_override] declared in .SomeList + public open fun listIterator (): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] kotlin.collections.MutableListIterator<.Some?> [fake_override] + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some?> [fake_override] overridden: - public open fun listIterator (p0: kotlin.Int): @[FlexibleNullability] kotlin.collections.MutableListIterator<.Some.SomeList>?> [fake_override] declared in .SomeList + public open fun listIterator (p0: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableListIterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[FlexibleNullability] kotlin.collections.MutableList<.Some?> [fake_override] + FUN FAKE_OVERRIDE name:subList visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:@[EnhancedNullability] kotlin.collections.MutableList<@[FlexibleNullability] .Some?> [fake_override] overridden: - public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[FlexibleNullability] kotlin.collections.MutableList<.Some.SomeList>?> [fake_override] declared in .SomeList + public open fun subList (p0: kotlin.Int, p1: kotlin.Int): @[EnhancedNullability] kotlin.collections.MutableList<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int @@ -458,23 +458,23 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun (): kotlin.Int [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.Spliterator<.Some?> [fake_override] + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some?> [fake_override] overridden: - public open fun spliterator (): @[FlexibleNullability] java.util.Spliterator<.Some.SomeList>?> [fake_override] declared in .SomeList + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some?> [fake_override] + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some?> [fake_override] overridden: - public open fun parallelStream (): @[FlexibleNullability] java.util.stream.Stream<.Some.SomeList>?> [fake_override] declared in .SomeList + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[FlexibleNullability] java.util.stream.Stream<.Some?> [fake_override] + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:java.util.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some?> [fake_override] overridden: - public open fun stream (): @[FlexibleNullability] java.util.stream.Stream<.Some.SomeList>?> [fake_override] declared in .SomeList + public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.Collection - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:java.util.function.Consumer.Some?>?) returnType:kotlin.Unit [fake_override] + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.lang.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.Some?>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun forEach (p0: java.util.function.Consumer.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.lang.Iterable - VALUE_PARAMETER name:p0 index:0 type:java.util.function.Consumer.Some?>? + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some?>? FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .SomeList @@ -488,9 +488,9 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:elementData visibility:public/*package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:.Some? [fake_override] + FUN FAKE_OVERRIDE name:elementData visibility:public/*package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some? [fake_override] overridden: - public/*package*/ open fun elementData (p0: kotlin.Int): .Some.SomeList>? [fake_override] declared in .SomeList + public/*package*/ open fun elementData (p0: kotlin.Int): @[FlexibleNullability] .Some.SomeList>? [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:trimToSize visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] @@ -502,90 +502,90 @@ FILE fqName: fileName:/MultiList.kt public open fun ensureCapacity (p0: kotlin.Int): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:clone visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Any [fake_override] + FUN FAKE_OVERRIDE name:clone visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] kotlin.Any [fake_override] overridden: - public open fun clone (): @[FlexibleNullability] kotlin.Any [fake_override] declared in .SomeList + public open fun clone (): @[EnhancedNullability] kotlin.Any [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Array? [fake_override] + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] overridden: - public open fun toArray (): kotlin.Array? [fake_override] declared in .SomeList + public open fun toArray (): @[FlexibleNullability] kotlin.Array? [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:kotlin.Array.FinalList.toArray?>?) returnType:kotlin.Array.FinalList.toArray?>? [fake_override] + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>?) returnType:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>? [fake_override] overridden: - public open fun toArray (p0: kotlin.Array.SomeList.toArray?>?): kotlin.Array.SomeList.toArray?>? [fake_override] declared in .SomeList - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + public open fun toArray (p0: @[FlexibleNullability] kotlin.Array.SomeList.toArray?>?): @[FlexibleNullability] kotlin.Array.SomeList.toArray?>? [fake_override] declared in .SomeList + TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.Array.FinalList.toArray?>? - FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:.Some?) returnType:.Some? [fake_override,operator] + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>? + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] .Some?) returnType:@[FlexibleNullability] .Some? [fake_override,operator] overridden: - public open fun set (p0: kotlin.Int, p1: .Some.SomeList>?): .Some.SomeList>? [fake_override,operator] declared in .SomeList + public open fun set (p0: kotlin.Int, p1: @[FlexibleNullability] .Some.SomeList>?): @[FlexibleNullability] .Some.SomeList>? [fake_override,operator] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:.Some? - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some?) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] .Some? + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Boolean [fake_override] overridden: - public open fun add (p0: .Some.SomeList>?): kotlin.Boolean [fake_override] declared in .SomeList + public open fun add (p0: @[FlexibleNullability] .Some.SomeList>?): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:.Some? - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:.Some?) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some? + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] .Some?) returnType:kotlin.Unit [fake_override] overridden: - public open fun add (p0: kotlin.Int, p1: .Some.SomeList>?): kotlin.Unit [fake_override] declared in .SomeList + public open fun add (p0: kotlin.Int, p1: @[FlexibleNullability] .Some.SomeList>?): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:.Some? - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:.Some?) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] .Some? + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] .Some?) returnType:kotlin.Boolean [fake_override] overridden: - public open fun remove (p0: .Some.SomeList>?): kotlin.Boolean [fake_override] declared in .SomeList + public open fun remove (p0: @[FlexibleNullability] .Some.SomeList>?): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:.Some? + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] .Some? FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] overridden: public open fun clear (): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.collections.Collection.Some?>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun addAll (p0: @[FlexibleNullability] kotlin.collections.Collection.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.collections.Collection.Some?> - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[FlexibleNullability] kotlin.collections.Collection.Some?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some?> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun addAll (p0: kotlin.Int, p1: @[FlexibleNullability] kotlin.collections.Collection.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[FlexibleNullability] kotlin.collections.Collection.Some?> + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some?> FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] overridden: protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<.Some?>) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeAll (p0: kotlin.collections.Collection<.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun removeAll (p0: kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some?> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<.Some?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some?> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[FlexibleNullability] .Some?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun retainAll (p0: kotlin.collections.Collection<.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun retainAll (p0: kotlin.collections.Collection<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<.Some?> - FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.Predicate.Some?>) returnType:kotlin.Boolean [fake_override] + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[FlexibleNullability] .Some?> + FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some?>) returnType:kotlin.Boolean [fake_override] overridden: - public open fun removeIf (p0: @[FlexibleNullability] java.util.function.Predicate.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList + public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate.Some.SomeList>?>): kotlin.Boolean [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Predicate.Some?> - FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.UnaryOperator<.Some?>) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some?> + FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some?>) returnType:kotlin.Unit [fake_override] overridden: - public open fun replaceAll (p0: @[FlexibleNullability] java.util.function.UnaryOperator<.Some.SomeList>?>): kotlin.Unit [fake_override] declared in .SomeList + public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some.SomeList>?>): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.UnaryOperator<.Some?> - FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:java.util.Comparator.Some?>?) returnType:kotlin.Unit [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<@[FlexibleNullability] .Some?> + FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.Comparator.Some?>?) returnType:kotlin.Unit [fake_override] overridden: - public open fun sort (p0: java.util.Comparator.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList + public open fun sort (p0: @[FlexibleNullability] java.util.Comparator.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:java.util.Comparator.Some?>? - FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:.Some? [fake_override] + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator.Some?>? + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some? [fake_override] overridden: - public open fun removeAt (p0: kotlin.Int): .Some.SomeList>? [fake_override] declared in .SomeList + public open fun removeAt (p0: kotlin.Int): @[FlexibleNullability] .Some.SomeList>? [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int diff --git a/compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.fir.kt.txt b/compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.fir.kt.txt index c4bde9f59c7..31f6d88057f 100644 --- a/compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.fir.kt.txt @@ -1,4 +1,4 @@ fun foo() { - val ref1: KProperty0 = SomeJavaClass::someJavaField/*()*/ - val ref2: KProperty0 = SomeJavaClass::someJavaField/*()*/ + val ref1: KProperty0<@FlexibleNullability String?> = SomeJavaClass::someJavaField/*()*/ + val ref2: KProperty0<@FlexibleNullability String?> = SomeJavaClass::someJavaField/*()*/ } diff --git a/compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.fir.txt b/compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.fir.txt index dc93b505822..f38fa776307 100644 --- a/compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.fir.txt +++ b/compiler/testData/ir/irText/firProblems/SameJavaFieldReferences.fir.txt @@ -1,9 +1,9 @@ FILE fqName: fileName:/SameJavaFieldReferences.kt FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR name:ref1 type:kotlin.reflect.KProperty0 [val] - PROPERTY_REFERENCE 'public final someJavaField: kotlin.String? [val]' field='FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:someJavaField type:kotlin.String? visibility:public [final,static]' getter=null setter=null type=kotlin.reflect.KProperty0 origin=null + VAR name:ref1 type:kotlin.reflect.KProperty0<@[FlexibleNullability] kotlin.String?> [val] + PROPERTY_REFERENCE 'public final someJavaField: @[FlexibleNullability] kotlin.String? [val]' field='FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:someJavaField type:@[FlexibleNullability] kotlin.String? visibility:public [final,static]' getter=null setter=null type=kotlin.reflect.KProperty0<@[FlexibleNullability] kotlin.String?> origin=null <1>: - VAR name:ref2 type:kotlin.reflect.KProperty0 [val] - PROPERTY_REFERENCE 'public final someJavaField: kotlin.String? [val]' field='FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:someJavaField type:kotlin.String? visibility:public [final,static]' getter=null setter=null type=kotlin.reflect.KProperty0 origin=null + VAR name:ref2 type:kotlin.reflect.KProperty0<@[FlexibleNullability] kotlin.String?> [val] + PROPERTY_REFERENCE 'public final someJavaField: @[FlexibleNullability] kotlin.String? [val]' field='FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:someJavaField type:@[FlexibleNullability] kotlin.String? visibility:public [final,static]' getter=null setter=null type=kotlin.reflect.KProperty0<@[FlexibleNullability] kotlin.String?> origin=null <1>: diff --git a/compiler/testData/ir/irText/firProblems/SyntheticSetterType.fir.kt.txt b/compiler/testData/ir/irText/firProblems/SyntheticSetterType.fir.kt.txt index 617548322fa..0fbad156101 100644 --- a/compiler/testData/ir/irText/firProblems/SyntheticSetterType.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/SyntheticSetterType.fir.kt.txt @@ -1,3 +1,3 @@ fun foo(descriptor: PropertyDescriptorImpl) { - descriptor.setOverriddenDescriptors(overriddenDescriptors = emptyList()) + descriptor.setOverriddenDescriptors(overriddenDescriptors = emptyList<@FlexibleNullability PropertyDescriptor?>()) } diff --git a/compiler/testData/ir/irText/firProblems/SyntheticSetterType.fir.txt b/compiler/testData/ir/irText/firProblems/SyntheticSetterType.fir.txt index e9069a7a249..89f8031f8aa 100644 --- a/compiler/testData/ir/irText/firProblems/SyntheticSetterType.fir.txt +++ b/compiler/testData/ir/irText/firProblems/SyntheticSetterType.fir.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/SyntheticSetterType.kt FUN name:foo visibility:public modality:FINAL <> (descriptor:.PropertyDescriptorImpl) returnType:kotlin.Unit VALUE_PARAMETER name:descriptor index:0 type:.PropertyDescriptorImpl BLOCK_BODY - CALL 'public open fun setOverriddenDescriptors (overriddenDescriptors: @[EnhancedNullability] kotlin.collections.Collection.CallableMemberDescriptor?>): kotlin.Unit declared in .PropertyDescriptorImpl' type=kotlin.Unit origin=EQ + CALL 'public open fun setOverriddenDescriptors (overriddenDescriptors: @[EnhancedNullability] kotlin.collections.Collection.CallableMemberDescriptor?>): kotlin.Unit declared in .PropertyDescriptorImpl' type=kotlin.Unit origin=EQ $this: GET_VAR 'descriptor: .PropertyDescriptorImpl declared in .foo' type=.PropertyDescriptorImpl origin=null - overriddenDescriptors: CALL 'public final fun emptyList (): kotlin.collections.List declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<.PropertyDescriptor?> origin=null - : .PropertyDescriptor? + overriddenDescriptors: CALL 'public final fun emptyList (): kotlin.collections.List declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<@[FlexibleNullability] .PropertyDescriptor?> origin=null + : @[FlexibleNullability] .PropertyDescriptor? diff --git a/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.txt b/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.txt index 7d10168abdb..75a166442a5 100644 --- a/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.txt +++ b/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.txt @@ -24,7 +24,7 @@ FILE fqName: fileName:/v8arrayToList.kt CONSTRUCTOR_CALL 'public constructor () [primary] declared in .V8Array' type=.V8Array origin=null VAR name:list type:kotlin.collections.List [val] TYPE_OP type=kotlin.collections.List origin=CAST typeOperand=kotlin.collections.List - CALL 'public open fun toList (array: .V8Array?): kotlin.collections.List<*>? declared in .Utils' type=kotlin.collections.List<*>? origin=null + CALL 'public open fun toList (array: @[FlexibleNullability] .V8Array?): @[FlexibleNullability] kotlin.collections.List<*>? declared in .Utils' type=@[FlexibleNullability] kotlin.collections.List<*>? origin=null array: GET_VAR 'val array: .V8Array [val] declared in .box' type=.V8Array origin=null RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CALL 'public abstract fun get (index: kotlin.Int): E of kotlin.collections.List [operator] declared in kotlin.collections.List' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt index 9ee70479d91..227d6f6bedb 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt @@ -26,7 +26,7 @@ fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) { val tmp1_safe_receiver: Char? = .nextChar() when { EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.let(block = local fun (it: Char): StringBuilder? { + else -> tmp1_safe_receiver.let(block = local fun (it: Char): @FlexibleNullability StringBuilder? { return sb.append(p0 = it) } ) diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.txt index 6ac9386d126..dbf6792aed8 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.txt @@ -60,16 +60,16 @@ FILE fqName: fileName:/coercionToUnitForNestedWhen.kt then: CONST Boolean type=kotlin.Boolean value=false body: BLOCK type=kotlin.Unit origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - WHEN type=@[FlexibleNullability] java.lang.StringBuilder? origin=IF + WHEN type=java.lang.StringBuilder? origin=IF BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'var ch: kotlin.Char? [var] declared in .consumeRestOfQuotedSequence' type=kotlin.Char? origin=null arg1: CALL 'private final fun (): kotlin.Char declared in ' type=kotlin.Char origin=GET_PROPERTY - then: BLOCK type=java.lang.StringBuilder? origin=SAFE_CALL + then: BLOCK type=@[FlexibleNullability] java.lang.StringBuilder? origin=SAFE_CALL VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Char? [val] CALL 'private final fun nextChar (): kotlin.Char? declared in ' type=kotlin.Char? origin=null $receiver: GET_VAR ': java.io.Reader declared in .consumeRestOfQuotedSequence' type=java.io.Reader origin=null - WHEN type=java.lang.StringBuilder? origin=null + WHEN type=@[FlexibleNullability] java.lang.StringBuilder? origin=null BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'val tmp_1: kotlin.Char? [val] declared in .consumeRestOfQuotedSequence' type=kotlin.Char? origin=null @@ -77,21 +77,21 @@ FILE fqName: fileName:/coercionToUnitForNestedWhen.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun let (block: kotlin.Function1): R of kotlin.StandardKt.let [inline] declared in kotlin.StandardKt' type=java.lang.StringBuilder? origin=null + then: CALL 'public final fun let (block: kotlin.Function1): R of kotlin.StandardKt.let [inline] declared in kotlin.StandardKt' type=@[FlexibleNullability] java.lang.StringBuilder? origin=null : kotlin.Char - : java.lang.StringBuilder? + : @[FlexibleNullability] java.lang.StringBuilder? $receiver: GET_VAR 'val tmp_1: kotlin.Char? [val] declared in .consumeRestOfQuotedSequence' type=kotlin.Char? origin=null - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Char) returnType:java.lang.StringBuilder? + block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Char) returnType:@[FlexibleNullability] java.lang.StringBuilder? VALUE_PARAMETER name:it index:0 type:kotlin.Char BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Char): java.lang.StringBuilder? declared in .consumeRestOfQuotedSequence' - CALL 'public open fun append (p0: kotlin.Char): java.lang.StringBuilder? declared in java.lang.StringBuilder' type=java.lang.StringBuilder? origin=null + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Char): @[FlexibleNullability] java.lang.StringBuilder? declared in .consumeRestOfQuotedSequence' + CALL 'public open fun append (p0: kotlin.Char): @[FlexibleNullability] java.lang.StringBuilder? declared in java.lang.StringBuilder' type=@[FlexibleNullability] java.lang.StringBuilder? origin=null $this: GET_VAR 'sb: java.lang.StringBuilder declared in .consumeRestOfQuotedSequence' type=java.lang.StringBuilder origin=null p0: GET_VAR 'it: kotlin.Char declared in .consumeRestOfQuotedSequence.' type=kotlin.Char origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun append (p0: kotlin.Char): java.lang.StringBuilder? declared in java.lang.StringBuilder' type=java.lang.StringBuilder? origin=null + then: CALL 'public open fun append (p0: kotlin.Char): @[FlexibleNullability] java.lang.StringBuilder? declared in java.lang.StringBuilder' type=@[FlexibleNullability] java.lang.StringBuilder? origin=null $this: GET_VAR 'sb: java.lang.StringBuilder declared in .consumeRestOfQuotedSequence' type=java.lang.StringBuilder origin=null p0: GET_VAR 'var ch: kotlin.Char? [var] declared in .consumeRestOfQuotedSequence' type=kotlin.Char? origin=null SET_VAR 'var ch: kotlin.Char? [var] declared in .consumeRestOfQuotedSequence' type=kotlin.Unit origin=EQ diff --git a/compiler/testData/ir/irText/firProblems/kt19251.fir.kt.txt b/compiler/testData/ir/irText/firProblems/kt19251.fir.kt.txt index f2ec41e978f..64524a7e5d8 100644 --- a/compiler/testData/ir/irText/firProblems/kt19251.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/kt19251.fir.kt.txt @@ -1,11 +1,12 @@ fun box(): String { val map: MutableMap = mutableMapOf() - val fn: Fun = local fun (it: String?): String? { + val fn: Fun = local fun (it: @FlexibleNullability String?): @FlexibleNullability String? { return TODO() } /*-> Fun */ - return map.computeIfAbsent(p0 = fn, p1 = local fun (it: Fun?): String? { + return map.computeIfAbsent(p0 = fn, p1 = local fun (it: @FlexibleNullability Fun?): @FlexibleNullability String? { return "OK" } - /*-> @FlexibleNullability Function */) + /*-> @EnhancedNullability Function<@FlexibleNullability Fun?, @FlexibleNullability String?> */) } + diff --git a/compiler/testData/ir/irText/firProblems/kt19251.fir.txt b/compiler/testData/ir/irText/firProblems/kt19251.fir.txt index f2cf0e55ff7..a3e44ac110d 100644 --- a/compiler/testData/ir/irText/firProblems/kt19251.fir.txt +++ b/compiler/testData/ir/irText/firProblems/kt19251.fir.txt @@ -7,20 +7,20 @@ FILE fqName: fileName:/test.kt : kotlin.String VAR name:fn type:.Fun [val] TYPE_OP type=.Fun origin=SAM_CONVERSION typeOperand=.Fun - FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String?) returnType:kotlin.String? - VALUE_PARAMETER name:it index:0 type:kotlin.String? + FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] kotlin.String?, @[FlexibleNullability] kotlin.String?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:@[FlexibleNullability] kotlin.String?) returnType:@[FlexibleNullability] kotlin.String? + VALUE_PARAMETER name:it index:0 type:@[FlexibleNullability] kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String?): kotlin.String? declared in .box' + RETURN type=kotlin.Nothing from='local final fun (it: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in .box' CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - CALL 'public open fun computeIfAbsent (p0: @[FlexibleNullability] K of java.util.Map, p1: @[FlexibleNullability] java.util.function.Function): @[FlexibleNullability] V of java.util.Map declared in java.util.Map' type=kotlin.String origin=null + CALL 'public open fun computeIfAbsent (p0: @[EnhancedNullability] K of java.util.Map, p1: @[EnhancedNullability] java.util.function.Function): @[EnhancedNullability] V of java.util.Map declared in java.util.Map' type=kotlin.String origin=null $this: GET_VAR 'val map: kotlin.collections.MutableMap<.Fun, kotlin.String> [val] declared in .box' type=kotlin.collections.MutableMap<.Fun, kotlin.String> origin=null p0: GET_VAR 'val fn: .Fun [val] declared in .box' type=.Fun origin=null - p1: TYPE_OP type=@[FlexibleNullability] java.util.function.Function<.Fun?, kotlin.String?> origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.util.function.Function<.Fun?, kotlin.String?> - FUN_EXPR type=kotlin.Function1<.Fun?, kotlin.String?> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:.Fun?) returnType:kotlin.String? - VALUE_PARAMETER name:it index:0 type:.Fun? + p1: TYPE_OP type=@[EnhancedNullability] java.util.function.Function<@[FlexibleNullability] .Fun?, @[FlexibleNullability] kotlin.String?> origin=SAM_CONVERSION typeOperand=@[EnhancedNullability] java.util.function.Function<@[FlexibleNullability] .Fun?, @[FlexibleNullability] kotlin.String?> + FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] .Fun?, @[FlexibleNullability] kotlin.String?> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:@[FlexibleNullability] .Fun?) returnType:@[FlexibleNullability] kotlin.String? + VALUE_PARAMETER name:it index:0 type:@[FlexibleNullability] .Fun? BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: .Fun?): kotlin.String? declared in .box' + RETURN type=kotlin.Nothing from='local final fun (it: @[FlexibleNullability] .Fun?): @[FlexibleNullability] kotlin.String? declared in .box' CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/irText/firProblems/putIfAbsent.fir.txt b/compiler/testData/ir/irText/firProblems/putIfAbsent.fir.txt index 810b15fd1f9..ae8ba2428a7 100644 --- a/compiler/testData/ir/irText/firProblems/putIfAbsent.fir.txt +++ b/compiler/testData/ir/irText/firProblems/putIfAbsent.fir.txt @@ -16,7 +16,7 @@ FILE fqName: fileName:/putIfAbsent.kt : T of .Owner.foo : T of .Owner.foo TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun putIfAbsent (p0: @[FlexibleNullability] K of java.util.Map, p1: @[FlexibleNullability] V of java.util.Map): @[FlexibleNullability] V of java.util.Map? declared in java.util.Map' type=T of .Owner.foo? origin=null + CALL 'public open fun putIfAbsent (p0: @[EnhancedNullability] K of java.util.Map, p1: @[EnhancedNullability] V of java.util.Map): @[EnhancedNullability] V of java.util.Map? declared in java.util.Map' type=T of .Owner.foo? origin=null $this: GET_VAR 'val map: kotlin.collections.MutableMap.Owner.foo, T of .Owner.foo> [val] declared in .Owner.foo' type=kotlin.collections.MutableMap.Owner.foo, T of .Owner.foo> origin=null p0: GET_VAR 'x: T of .Owner.foo declared in .Owner.foo' type=T of .Owner.foo origin=null p1: GET_VAR 'y: T of .Owner.foo declared in .Owner.foo' type=T of .Owner.foo origin=null diff --git a/compiler/testData/ir/irText/firProblems/throwableStackTrace.fir.txt b/compiler/testData/ir/irText/firProblems/throwableStackTrace.fir.txt index 23028c6f810..40a4f07f34c 100644 --- a/compiler/testData/ir/irText/firProblems/throwableStackTrace.fir.txt +++ b/compiler/testData/ir/irText/firProblems/throwableStackTrace.fir.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/throwableStackTrace.kt FUN name:foo visibility:public modality:FINAL <> (t:kotlin.Throwable) returnType:kotlin.Unit VALUE_PARAMETER name:t index:0 type:kotlin.Throwable BLOCK_BODY - CALL 'public open fun setStackTrace (p0: kotlin.Array?): kotlin.Unit declared in java.lang.Throwable' type=kotlin.Unit origin=EQ + CALL 'public open fun setStackTrace (p0: @[FlexibleNullability] kotlin.Array?): kotlin.Unit declared in java.lang.Throwable' type=kotlin.Unit origin=EQ $this: GET_VAR 't: kotlin.Throwable declared in .foo' type=kotlin.Throwable origin=null - p0: CALL 'public open fun getStackTrace (): kotlin.Array? declared in java.lang.Throwable' type=kotlin.Array? origin=GET_PROPERTY + p0: CALL 'public open fun getStackTrace (): @[FlexibleNullability] kotlin.Array? declared in java.lang.Throwable' type=@[FlexibleNullability] kotlin.Array? origin=GET_PROPERTY $this: GET_VAR 't: kotlin.Throwable declared in .foo' type=kotlin.Throwable origin=null diff --git a/compiler/testData/ir/irText/firProblems/typeParameterFromJavaClass.fir.txt b/compiler/testData/ir/irText/firProblems/typeParameterFromJavaClass.fir.txt index 91313fa3524..bd9d2f9e418 100644 --- a/compiler/testData/ir/irText/firProblems/typeParameterFromJavaClass.fir.txt +++ b/compiler/testData/ir/irText/firProblems/typeParameterFromJavaClass.fir.txt @@ -10,6 +10,6 @@ FILE fqName: fileName:/typeParameterFromJavaClass.kt VALUE_PARAMETER name:it index:0 type:.Couple<.FilePath> BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public abstract fun getName (): kotlin.String? declared in .FilePath' type=kotlin.String? origin=GET_PROPERTY - $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:second type:B of .Pair? visibility:public [final]' type=.FilePath? origin=GET_PROPERTY + CALL 'public abstract fun getName (): @[FlexibleNullability] kotlin.String? declared in .FilePath' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY + $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:second type:@[FlexibleNullability] B of .Pair? visibility:public [final]' type=@[FlexibleNullability] .FilePath? origin=GET_PROPERTY receiver: GET_VAR 'it: .Couple<.FilePath> declared in .foo.' type=.Couple<.FilePath> origin=null diff --git a/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.txt b/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.txt index ce24e7a2801..8a4680fdba9 100644 --- a/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.txt +++ b/compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.fir.txt @@ -395,7 +395,7 @@ FILE fqName: fileName:/typeVariableAfterBuildMap.kt $this: VALUE_PARAMETER name: type:.Visibilities.Inherited BLOCK_BODY THROW type=kotlin.Nothing - CONSTRUCTOR_CALL 'public constructor (p0: kotlin.String?) declared in java.lang.IllegalStateException' type=java.lang.IllegalStateException origin=null + CONSTRUCTOR_CALL 'public constructor (p0: @[FlexibleNullability] kotlin.String?) declared in java.lang.IllegalStateException' type=java.lang.IllegalStateException origin=null p0: CONST String type=kotlin.String value="This method shouldn't be invoked for INHERITED visibility" PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Visibility) returnType:kotlin.String [fake_override] @@ -503,7 +503,7 @@ FILE fqName: fileName:/typeVariableAfterBuildMap.kt $this: VALUE_PARAMETER name: type:.Visibilities.Unknown BLOCK_BODY THROW type=kotlin.Nothing - CONSTRUCTOR_CALL 'public constructor (p0: kotlin.String?) declared in java.lang.IllegalStateException' type=java.lang.IllegalStateException origin=null + CONSTRUCTOR_CALL 'public constructor (p0: @[FlexibleNullability] kotlin.String?) declared in java.lang.IllegalStateException' type=java.lang.IllegalStateException origin=null p0: CONST String type=kotlin.String value="This method shouldn't be invoked for UNKNOWN visibility" PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Visibility) returnType:kotlin.String [fake_override] diff --git a/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.fir.kt.txt b/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.fir.kt.txt index 35d4f744505..46c3209a98b 100644 --- a/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.fir.kt.txt +++ b/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.fir.kt.txt @@ -1,6 +1,6 @@ fun problematic(lss: List>): List { - return lss.flatMap, T?>(transform = local fun (it: List): Iterable { - return id(v = it) /*!! List */ + return lss.flatMap, @FlexibleNullability T?>(transform = local fun (it: List): Iterable<@FlexibleNullability T?> { + return id<@FlexibleNullability T?>(v = it) /*!! List<@FlexibleNullability T?> */ } ) } diff --git a/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.fir.txt b/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.fir.txt index ebf2b86679b..bc44fdb6952 100644 --- a/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.fir.txt @@ -4,16 +4,16 @@ FILE fqName: fileName:/typeParametersInImplicitCast.kt VALUE_PARAMETER name:lss index:0 type:kotlin.collections.List.problematic>> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun problematic (lss: kotlin.collections.List.problematic>>): kotlin.collections.List.problematic> declared in ' - CALL 'public final fun flatMap (transform: kotlin.Function1>): kotlin.collections.List [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List.problematic?> origin=null + CALL 'public final fun flatMap (transform: kotlin.Function1>): kotlin.collections.List [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<@[FlexibleNullability] T of .problematic?> origin=null : kotlin.collections.List.problematic> - : T of .problematic? + : @[FlexibleNullability] T of .problematic? $receiver: GET_VAR 'lss: kotlin.collections.List.problematic>> declared in .problematic' type=kotlin.collections.List.problematic>> origin=null - transform: FUN_EXPR type=kotlin.Function1.problematic>, kotlin.collections.Iterable.problematic?>> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.collections.List.problematic>) returnType:kotlin.collections.Iterable.problematic?> + transform: FUN_EXPR type=kotlin.Function1.problematic>, kotlin.collections.Iterable<@[FlexibleNullability] T of .problematic?>> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.collections.List.problematic>) returnType:kotlin.collections.Iterable<@[FlexibleNullability] T of .problematic?> VALUE_PARAMETER name:it index:0 type:kotlin.collections.List.problematic> BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.collections.List.problematic>): kotlin.collections.Iterable.problematic?> declared in .problematic' - TYPE_OP type=kotlin.collections.List.problematic?> origin=IMPLICIT_NOTNULL typeOperand=kotlin.collections.List.problematic?> - CALL 'public/*package*/ open fun id (v: kotlin.collections.List.ListId.id?>?): @[EnhancedNullability] kotlin.collections.List.ListId.id?> declared in .ListId' type=@[EnhancedNullability] kotlin.collections.List.problematic?> origin=null - : T of .problematic? + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.collections.List.problematic>): kotlin.collections.Iterable<@[FlexibleNullability] T of .problematic?> declared in .problematic' + TYPE_OP type=kotlin.collections.List<@[FlexibleNullability] T of .problematic?> origin=IMPLICIT_NOTNULL typeOperand=kotlin.collections.List<@[FlexibleNullability] T of .problematic?> + CALL 'public/*package*/ open fun id (v: @[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] T of .ListId.id?>?): @[EnhancedNullability] kotlin.collections.List<@[FlexibleNullability] T of .ListId.id?> declared in .ListId' type=@[EnhancedNullability] kotlin.collections.List<@[FlexibleNullability] T of .problematic?> origin=null + : @[FlexibleNullability] T of .problematic? v: GET_VAR 'it: kotlin.collections.List.problematic> declared in .problematic.' type=kotlin.collections.List.problematic> origin=null diff --git a/compiler/testData/ir/irText/stubs/builtinMap.fir.kt.txt b/compiler/testData/ir/irText/stubs/builtinMap.fir.kt.txt index 1a2febaf1d0..a43473a82d0 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.fir.kt.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.fir.kt.txt @@ -1,7 +1,7 @@ fun Map.plus(pair: Pair): Map { return when { .isEmpty() -> mapOf(pair = pair) - else -> LinkedHashMap(p0 = ).apply>(block = local fun LinkedHashMap.() { + else -> LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>(p0 = ).apply>(block = local fun LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>.() { .put(p0 = pair.(), p1 = pair.()) /*~> Unit */ } ) diff --git a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt index 3e4c660222d..c081da912c4 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt @@ -16,19 +16,19 @@ FILE fqName: fileName:/builtinMap.kt pair: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun apply (block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.StandardKt.apply [inline] declared in kotlin.StandardKt' type=java.util.LinkedHashMap.plus?, V1 of .plus?> origin=null - : java.util.LinkedHashMap.plus?, V1 of .plus?> - $receiver: CONSTRUCTOR_CALL 'public constructor (p0: kotlin.collections.Map?) declared in java.util.LinkedHashMap' type=java.util.LinkedHashMap.plus?, V1 of .plus?> origin=null - : K1 of .plus? - : V1 of .plus? + then: CALL 'public final fun apply (block: @[ExtensionFunctionType] kotlin.Function1): T of kotlin.StandardKt.apply [inline] declared in kotlin.StandardKt' type=java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> origin=null + : java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> + $receiver: CONSTRUCTOR_CALL 'public constructor (p0: @[FlexibleNullability] kotlin.collections.Map?) declared in java.util.LinkedHashMap' type=java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> origin=null + : @[FlexibleNullability] K1 of .plus? + : @[FlexibleNullability] V1 of .plus? p0: GET_VAR ': kotlin.collections.Map.plus, V1 of .plus> declared in .plus' type=kotlin.collections.Map.plus, V1 of .plus> origin=null - block: FUN_EXPR type=kotlin.Function1.plus?, V1 of .plus?>, kotlin.Unit> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:java.util.LinkedHashMap.plus?, V1 of .plus?>) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:java.util.LinkedHashMap.plus?, V1 of .plus?> + block: FUN_EXPR type=kotlin.Function1.plus?, @[FlexibleNullability] V1 of .plus?>, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun put (p0: @[FlexibleNullability] K of java.util.LinkedHashMap?, p1: @[FlexibleNullability] V of java.util.LinkedHashMap?): @[FlexibleNullability] V of java.util.LinkedHashMap? [fake_override] declared in java.util.LinkedHashMap' type=V1 of .plus? origin=null - $this: GET_VAR ': java.util.LinkedHashMap.plus?, V1 of .plus?> declared in .plus.' type=java.util.LinkedHashMap.plus?, V1 of .plus?> origin=null + CALL 'public open fun put (p0: @[FlexibleNullability] K of java.util.LinkedHashMap?, p1: @[FlexibleNullability] V of java.util.LinkedHashMap?): V of java.util.LinkedHashMap? [fake_override] declared in java.util.LinkedHashMap' type=V1 of .plus? origin=null + $this: GET_VAR ': java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> declared in .plus.' type=java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> origin=null p0: CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=K1 of .plus origin=GET_PROPERTY $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null p1: CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=V1 of .plus origin=GET_PROPERTY diff --git a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.kt.txt b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.kt.txt index cc8b41cd181..576daa7ec95 100644 --- a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.kt.txt +++ b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.kt.txt @@ -1,15 +1,16 @@ -fun test1(): J1 { - return J1() +fun test1(): J1<@FlexibleNullability Int?> { + return J1<@FlexibleNullability Int?>() } -fun test2(): J1 { - return J1(x1 = 1) +fun test2(): J1<@FlexibleNullability Int?> { + return J1<@FlexibleNullability Int?, @FlexibleNullability Int?>(x1 = 1) } -fun test3(j1: J1): J2 { - return j1.J2() +fun test3(j1: J1): J2<@FlexibleNullability Int?, Any> { + return j1.J2<@FlexibleNullability Int?>() } -fun test4(j1: J1): J2 { - return j1.J2(x2 = 1) +fun test4(j1: J1): J2<@FlexibleNullability Int?, Any> { + return j1.J2<@FlexibleNullability Int?, @FlexibleNullability Int?>(x2 = 1) } + diff --git a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt index 619385ad343..ac75c666454 100644 --- a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt +++ b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.fir.txt @@ -1,29 +1,29 @@ FILE fqName: fileName:/javaConstructorWithTypeParameters.kt - FUN name:test1 visibility:public modality:FINAL <> () returnType:.J1 + FUN name:test1 visibility:public modality:FINAL <> () returnType:.J1<@[FlexibleNullability] kotlin.Int?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (): .J1 declared in ' - CONSTRUCTOR_CALL 'public constructor () declared in .J1' type=.J1 origin=null - : kotlin.Int? - FUN name:test2 visibility:public modality:FINAL <> () returnType:.J1 + RETURN type=kotlin.Nothing from='public final fun test1 (): .J1<@[FlexibleNullability] kotlin.Int?> declared in ' + CONSTRUCTOR_CALL 'public constructor () declared in .J1' type=.J1<@[FlexibleNullability] kotlin.Int?> origin=null + : @[FlexibleNullability] kotlin.Int? + FUN name:test2 visibility:public modality:FINAL <> () returnType:.J1<@[FlexibleNullability] kotlin.Int?> BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (): .J1 declared in ' - CONSTRUCTOR_CALL 'public constructor (x1: X1 of .J1.?) declared in .J1' type=.J1 origin=null - : kotlin.Int? - : kotlin.Int? + RETURN type=kotlin.Nothing from='public final fun test2 (): .J1<@[FlexibleNullability] kotlin.Int?> declared in ' + CONSTRUCTOR_CALL 'public constructor (x1: @[FlexibleNullability] X1 of .J1.?) declared in .J1' type=.J1<@[FlexibleNullability] kotlin.Int?> origin=null + : @[FlexibleNullability] kotlin.Int? + : @[FlexibleNullability] kotlin.Int? x1: CONST Int type=kotlin.Int value=1 - FUN name:test3 visibility:public modality:FINAL <> (j1:.J1) returnType:.J1.J2 + FUN name:test3 visibility:public modality:FINAL <> (j1:.J1) returnType:.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> VALUE_PARAMETER name:j1 index:0 type:.J1 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test3 (j1: .J1): .J1.J2 declared in ' - CONSTRUCTOR_CALL 'public constructor () declared in .J1.J2' type=.J1.J2 origin=null - : kotlin.Int? + RETURN type=kotlin.Nothing from='public final fun test3 (j1: .J1): .J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> declared in ' + CONSTRUCTOR_CALL 'public constructor () declared in .J1.J2' type=.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> origin=null + : @[FlexibleNullability] kotlin.Int? $outer: GET_VAR 'j1: .J1 declared in .test3' type=.J1 origin=null - FUN name:test4 visibility:public modality:FINAL <> (j1:.J1) returnType:.J1.J2 + FUN name:test4 visibility:public modality:FINAL <> (j1:.J1) returnType:.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> VALUE_PARAMETER name:j1 index:0 type:.J1 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (j1: .J1): .J1.J2 declared in ' - CONSTRUCTOR_CALL 'public constructor (x2: X2 of .J1.J2.?) declared in .J1.J2' type=.J1.J2 origin=null - : kotlin.Int? - : kotlin.Int? + RETURN type=kotlin.Nothing from='public final fun test4 (j1: .J1): .J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> declared in ' + CONSTRUCTOR_CALL 'public constructor (x2: @[FlexibleNullability] X2 of .J1.J2.?) declared in .J1.J2' type=.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> origin=null + : @[FlexibleNullability] kotlin.Int? + : @[FlexibleNullability] kotlin.Int? $outer: GET_VAR 'j1: .J1 declared in .test4' type=.J1 origin=null x2: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/stubs/javaEnum.fir.kt.txt b/compiler/testData/ir/irText/stubs/javaEnum.fir.kt.txt index 1bd552f2499..10d54993604 100644 --- a/compiler/testData/ir/irText/stubs/javaEnum.fir.kt.txt +++ b/compiler/testData/ir/irText/stubs/javaEnum.fir.kt.txt @@ -1,3 +1,3 @@ -val test: @FlexibleNullability JEnum +val test: JEnum field = JEnum.ONE get diff --git a/compiler/testData/ir/irText/stubs/javaEnum.fir.txt b/compiler/testData/ir/irText/stubs/javaEnum.fir.txt index 7463a993c3c..894d18fc502 100644 --- a/compiler/testData/ir/irText/stubs/javaEnum.fir.txt +++ b/compiler/testData/ir/irText/stubs/javaEnum.fir.txt @@ -1,10 +1,10 @@ FILE fqName: fileName:/javaEnum.kt PROPERTY name:test visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test type:@[FlexibleNullability] .JEnum visibility:private [final,static] + FIELD PROPERTY_BACKING_FIELD name:test type:.JEnum visibility:private [final,static] EXPRESSION_BODY - GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_JAVA_DECLARATION_STUB name:ONE' type=@[FlexibleNullability] .JEnum - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:@[FlexibleNullability] .JEnum + GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_JAVA_DECLARATION_STUB name:ONE' type=@[EnhancedNullability] .JEnum + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.JEnum correspondingProperty: PROPERTY name:test visibility:public modality:FINAL [val] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] .JEnum declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test type:@[FlexibleNullability] .JEnum visibility:private [final,static]' type=@[FlexibleNullability] .JEnum origin=null + RETURN type=kotlin.Nothing from='public final fun (): .JEnum declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test type:.JEnum visibility:private [final,static]' type=.JEnum origin=null diff --git a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.fir.kt.txt b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.fir.kt.txt deleted file mode 100644 index 51f64ae6b60..00000000000 --- a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.fir.kt.txt +++ /dev/null @@ -1,3 +0,0 @@ -val test: String? - field = J().getFoo() - get diff --git a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.fir.txt b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.fir.txt deleted file mode 100644 index 951243fb016..00000000000 --- a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.fir.txt +++ /dev/null @@ -1,11 +0,0 @@ -FILE fqName: fileName:/javaSyntheticProperty.kt - PROPERTY name:test visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.String? visibility:private [final,static] - EXPRESSION_BODY - CALL 'public open fun getFoo (): kotlin.String? declared in .J' type=kotlin.String? origin=GET_PROPERTY - $this: CONSTRUCTOR_CALL 'public/*package*/ constructor () [primary] declared in .J' type=.J origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String? - correspondingProperty: PROPERTY name:test visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String? declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.String? visibility:private [final,static]' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt index 3fed59d2988..682ee0fbff0 100644 --- a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt +++ b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DUMP_DEPENDENCIES // FILE: javaSyntheticProperty.kt val test = J().foo diff --git a/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.kt.txt b/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.kt.txt index 7b992fe5683..c70146ea178 100644 --- a/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.kt.txt +++ b/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.kt.txt @@ -1,4 +1,4 @@ -val Class<*>.test: Array? - get(): Array? { +val Class<*>.test: @FlexibleNullability Array? + get(): @FlexibleNullability Array? { return .getDeclaredFields() } diff --git a/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.txt b/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.txt index 9ae156405a8..6813f4bb0cf 100644 --- a/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.txt +++ b/compiler/testData/ir/irText/stubs/jdkClassSyntheticProperty.fir.txt @@ -1,9 +1,9 @@ FILE fqName: fileName:/jdkClassSyntheticProperty.kt PROPERTY name:test visibility:public modality:FINAL [val] - FUN name: visibility:public modality:FINAL <> ($receiver:java.lang.Class<*>) returnType:kotlin.Array? + FUN name: visibility:public modality:FINAL <> ($receiver:java.lang.Class<*>) returnType:@[FlexibleNullability] kotlin.Array? correspondingProperty: PROPERTY name:test visibility:public modality:FINAL [val] $receiver: VALUE_PARAMETER name: type:java.lang.Class<*> BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Array? declared in ' - CALL 'public open fun getDeclaredFields (): kotlin.Array? declared in java.lang.Class' type=kotlin.Array? origin=GET_PROPERTY + RETURN type=kotlin.Nothing from='public final fun (): @[FlexibleNullability] kotlin.Array? declared in ' + CALL 'public open fun getDeclaredFields (): @[FlexibleNullability] kotlin.Array? declared in java.lang.Class' type=@[FlexibleNullability] kotlin.Array? origin=GET_PROPERTY $this: GET_VAR ': java.lang.Class<*> declared in .' type=java.lang.Class<*> origin=null diff --git a/compiler/testData/ir/irText/types/asOnPlatformType.fir.kt.txt b/compiler/testData/ir/irText/types/asOnPlatformType.fir.kt.txt deleted file mode 100644 index d79d5a6bf74..00000000000 --- a/compiler/testData/ir/irText/types/asOnPlatformType.fir.kt.txt +++ /dev/null @@ -1,16 +0,0 @@ -fun test() { - val nullStr: String? = nullString() - val nonnullStr: String? = nonnullString() - nullStr.foo() /*~> Unit */ - nonnullStr.foo() /*~> Unit */ - nullStr.fooN() /*~> Unit */ - nonnullStr.fooN() /*~> Unit */ -} - -inline fun T.foo(): T { - return as T -} - -inline fun T.fooN(): T? { - return as T? -} diff --git a/compiler/testData/ir/irText/types/asOnPlatformType.fir.txt b/compiler/testData/ir/irText/types/asOnPlatformType.fir.txt deleted file mode 100644 index 1b9feb3cc04..00000000000 --- a/compiler/testData/ir/irText/types/asOnPlatformType.fir.txt +++ /dev/null @@ -1,37 +0,0 @@ -FILE fqName: fileName:/asOnPlatformType.kt - FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:nullStr type:kotlin.String? [val] - CALL 'public open fun nullString (): kotlin.String? declared in .JavaClass' type=kotlin.String? origin=null - VAR name:nonnullStr type:kotlin.String? [val] - CALL 'public open fun nonnullString (): kotlin.String? declared in .JavaClass' type=kotlin.String? origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun foo (): T of .foo [inline] declared in ' type=kotlin.String? origin=null - : kotlin.String? - $receiver: GET_VAR 'val nullStr: kotlin.String? [val] declared in .test' type=kotlin.String? origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun foo (): T of .foo [inline] declared in ' type=kotlin.String? origin=null - : kotlin.String? - $receiver: GET_VAR 'val nonnullStr: kotlin.String? [val] declared in .test' type=kotlin.String? origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun fooN (): T of .fooN? [inline] declared in ' type=@[FlexibleNullability] kotlin.String? origin=null - : kotlin.String? - $receiver: GET_VAR 'val nullStr: kotlin.String? [val] declared in .test' type=kotlin.String? origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun fooN (): T of .fooN? [inline] declared in ' type=@[FlexibleNullability] kotlin.String? origin=null - : kotlin.String? - $receiver: GET_VAR 'val nonnullStr: kotlin.String? [val] declared in .test' type=kotlin.String? origin=null - FUN name:foo visibility:public modality:FINAL ($receiver:T of .foo) returnType:T of .foo [inline] - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $receiver: VALUE_PARAMETER name: type:T of .foo - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (): T of .foo [inline] declared in ' - TYPE_OP type=T of .foo origin=CAST typeOperand=T of .foo - GET_VAR ': T of .foo declared in .foo' type=T of .foo origin=null - FUN name:fooN visibility:public modality:FINAL ($receiver:T of .fooN) returnType:T of .fooN? [inline] - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - $receiver: VALUE_PARAMETER name: type:T of .fooN - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun fooN (): T of .fooN? [inline] declared in ' - TYPE_OP type=T of .fooN? origin=CAST typeOperand=T of .fooN? - GET_VAR ': T of .fooN declared in .fooN' type=T of .fooN origin=null diff --git a/compiler/testData/ir/irText/types/asOnPlatformType.kt b/compiler/testData/ir/irText/types/asOnPlatformType.kt index ec2c514501d..c8495b31f77 100644 --- a/compiler/testData/ir/irText/types/asOnPlatformType.kt +++ b/compiler/testData/ir/irText/types/asOnPlatformType.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: asOnPlatformType.kt fun test() { val nullStr = JavaClass.nullString() diff --git a/compiler/testData/ir/irText/types/javaWildcardType.fir.kt.txt b/compiler/testData/ir/irText/types/javaWildcardType.fir.kt.txt index 19ca57d394e..6c4e55aa877 100644 --- a/compiler/testData/ir/irText/types/javaWildcardType.fir.kt.txt +++ b/compiler/testData/ir/irText/types/javaWildcardType.fir.kt.txt @@ -13,19 +13,19 @@ class C : J, K { } - override fun jf1(): Collection? { + override fun jf1(): @FlexibleNullability Collection? { return .#<$$delegate_0>.jf1() } - override fun jf2(): Collection? { + override fun jf2(): @FlexibleNullability Collection<@FlexibleNullability CharSequence?>? { return .#<$$delegate_0>.jf2() } - override fun jg1(c: Collection?) { + override fun jg1(c: @FlexibleNullability Collection?) { .#<$$delegate_0>.jg1(c = c) } - override fun jg2(c: Collection?) { + override fun jg2(c: @FlexibleNullability Collection<@FlexibleNullability CharSequence?>?) { .#<$$delegate_0>.jg2(c = c) } @@ -49,3 +49,4 @@ class C : J, K { local /* final field */ val <$$delegate_1>: K = k } + diff --git a/compiler/testData/ir/irText/types/javaWildcardType.fir.txt b/compiler/testData/ir/irText/types/javaWildcardType.fir.txt index de876a68c0e..6c20db48a40 100644 --- a/compiler/testData/ir/irText/types/javaWildcardType.fir.txt +++ b/compiler/testData/ir/irText/types/javaWildcardType.fir.txt @@ -32,44 +32,44 @@ FILE fqName: fileName:/javaWildcardType.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.J; .K]' - FUN DELEGATED_MEMBER name:jf1 visibility:public modality:OPEN <> ($this:.C) returnType:kotlin.collections.Collection? + FUN DELEGATED_MEMBER name:jf1 visibility:public modality:OPEN <> ($this:.C) returnType:@[FlexibleNullability] kotlin.collections.Collection? overridden: - public abstract fun jf1 (): kotlin.collections.Collection? declared in .J + public abstract fun jf1 (): @[FlexibleNullability] kotlin.collections.Collection? declared in .J $this: VALUE_PARAMETER name: type:.C BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun jf1 (): kotlin.collections.Collection? declared in .C' - CALL 'public abstract fun jf1 (): kotlin.collections.Collection? declared in .J' type=kotlin.collections.Collection? origin=null + RETURN type=kotlin.Nothing from='public open fun jf1 (): @[FlexibleNullability] kotlin.collections.Collection? declared in .C' + CALL 'public abstract fun jf1 (): @[FlexibleNullability] kotlin.collections.Collection? declared in .J' type=@[FlexibleNullability] kotlin.collections.Collection? origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .C declared in .C.jf1' type=.C origin=null - FUN DELEGATED_MEMBER name:jf2 visibility:public modality:OPEN <> ($this:.C) returnType:kotlin.collections.Collection? + FUN DELEGATED_MEMBER name:jf2 visibility:public modality:OPEN <> ($this:.C) returnType:@[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>? overridden: - public abstract fun jf2 (): kotlin.collections.Collection? declared in .J + public abstract fun jf2 (): @[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>? declared in .J $this: VALUE_PARAMETER name: type:.C BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun jf2 (): kotlin.collections.Collection? declared in .C' - CALL 'public abstract fun jf2 (): kotlin.collections.Collection? declared in .J' type=kotlin.collections.Collection? origin=null + RETURN type=kotlin.Nothing from='public open fun jf2 (): @[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>? declared in .C' + CALL 'public abstract fun jf2 (): @[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>? declared in .J' type=@[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>? origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .C declared in .C.jf2' type=.C origin=null - FUN DELEGATED_MEMBER name:jg1 visibility:public modality:OPEN <> ($this:.C, c:kotlin.collections.Collection?) returnType:kotlin.Unit + FUN DELEGATED_MEMBER name:jg1 visibility:public modality:OPEN <> ($this:.C, c:@[FlexibleNullability] kotlin.collections.Collection?) returnType:kotlin.Unit overridden: - public abstract fun jg1 (c: kotlin.collections.Collection?): kotlin.Unit declared in .J + public abstract fun jg1 (c: @[FlexibleNullability] kotlin.collections.Collection?): kotlin.Unit declared in .J $this: VALUE_PARAMETER name: type:.C - VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection? + VALUE_PARAMETER name:c index:0 type:@[FlexibleNullability] kotlin.collections.Collection? BLOCK_BODY - CALL 'public abstract fun jg1 (c: kotlin.collections.Collection?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public abstract fun jg1 (c: @[FlexibleNullability] kotlin.collections.Collection?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .C declared in .C.jg1' type=.C origin=null - c: GET_VAR 'c: kotlin.collections.Collection? declared in .C.jg1' type=kotlin.collections.Collection? origin=null - FUN DELEGATED_MEMBER name:jg2 visibility:public modality:OPEN <> ($this:.C, c:kotlin.collections.Collection?) returnType:kotlin.Unit + c: GET_VAR 'c: @[FlexibleNullability] kotlin.collections.Collection? declared in .C.jg1' type=@[FlexibleNullability] kotlin.collections.Collection? origin=null + FUN DELEGATED_MEMBER name:jg2 visibility:public modality:OPEN <> ($this:.C, c:@[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>?) returnType:kotlin.Unit overridden: - public abstract fun jg2 (c: kotlin.collections.Collection?): kotlin.Unit declared in .J + public abstract fun jg2 (c: @[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>?): kotlin.Unit declared in .J $this: VALUE_PARAMETER name: type:.C - VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection? + VALUE_PARAMETER name:c index:0 type:@[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>? BLOCK_BODY - CALL 'public abstract fun jg2 (c: kotlin.collections.Collection?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public abstract fun jg2 (c: @[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final]' type=.J origin=null receiver: GET_VAR ': .C declared in .C.jg2' type=.C origin=null - c: GET_VAR 'c: kotlin.collections.Collection? declared in .C.jg2' type=kotlin.collections.Collection? origin=null + c: GET_VAR 'c: @[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>? declared in .C.jg2' type=@[FlexibleNullability] kotlin.collections.Collection<@[FlexibleNullability] kotlin.CharSequence?>? origin=null FIELD DELEGATE name:<$$delegate_0> type:.J visibility:local [final] EXPRESSION_BODY GET_VAR 'j: .J declared in .C.' type=.J origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.fir.kt.txt deleted file mode 100644 index a7dcb33a84d..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.fir.kt.txt +++ /dev/null @@ -1,35 +0,0 @@ -fun use(s: String) { -} - -fun testUse() { - use(s = notNullString() /*!! String */) -} - -fun testLocalVal() { - val local: String = notNullString() /*!! String */ -} - -fun testReturnValue(): String { - return notNullString() /*!! String */ -} - -val testGlobalVal: String - field = notNullString() /*!! String */ - get - -val testGlobalValGetter: String - get(): String { - return notNullString() /*!! String */ - } - -fun testJUse() { - use(s = nullString()) - use(s = notNullString()) -} - -fun testLocalVarUse() { - val ns: String? = nullString() - use(s = ns) - val nns: String = notNullString() /*!! String */ - use(s = nns) -} diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.fir.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.fir.txt deleted file mode 100644 index be18c790bcc..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.fir.txt +++ /dev/null @@ -1,53 +0,0 @@ -FILE fqName: fileName:/enhancedNullability.kt - FUN name:use visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit - VALUE_PARAMETER name:s index:0 type:kotlin.String - BLOCK_BODY - FUN name:testUse visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun use (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null - s: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null - FUN name:testLocalVal visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:local type:kotlin.String [val] - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null - FUN name:testReturnValue visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testReturnValue (): kotlin.String declared in ' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null - PROPERTY name:testGlobalVal visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:testGlobalVal type:kotlin.String visibility:private [final,static] - EXPRESSION_BODY - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String - correspondingProperty: PROPERTY name:testGlobalVal visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testGlobalVal type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null - PROPERTY name:testGlobalValGetter visibility:public modality:FINAL [val] - FUN name: visibility:public modality:FINAL <> () returnType:kotlin.String - correspondingProperty: PROPERTY name:testGlobalValGetter visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null - FUN name:testJUse visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public open fun use (s: @[EnhancedNullability] kotlin.String): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - s: CALL 'public open fun nullString (): kotlin.String? declared in .J' type=kotlin.String? origin=null - CALL 'public open fun use (s: @[EnhancedNullability] kotlin.String): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - s: CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null - FUN name:testLocalVarUse visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:ns type:kotlin.String? [val] - CALL 'public open fun nullString (): kotlin.String? declared in .J' type=kotlin.String? origin=null - CALL 'public open fun use (s: @[EnhancedNullability] kotlin.String): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - s: GET_VAR 'val ns: kotlin.String? [val] declared in .testLocalVarUse' type=kotlin.String? origin=null - VAR name:nns type:kotlin.String [val] - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun notNullString (): @[EnhancedNullability] kotlin.String declared in .J' type=@[EnhancedNullability] kotlin.String origin=null - CALL 'public open fun use (s: @[EnhancedNullability] kotlin.String): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - s: GET_VAR 'val nns: kotlin.String [val] declared in .testLocalVarUse' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.kt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.kt index 71cb62cdbfa..cfe84026a5f 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.kt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullability.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: enhancedNullability.kt // WITH_JDK fun use(s: String) {} diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt index 6434991f23f..5e4ad76c2c5 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt @@ -59,29 +59,30 @@ fun test1() { } fun test2() { - val : Q<@FlexibleNullability String, String?>? = notNullComponents() - val x: @FlexibleNullability String = .component1() - val y: String? = .component2() - use(x = x, y = y /*!! String */) + val : @FlexibleNullability Q<@EnhancedNullability String, @FlexibleNullability String?>? = notNullComponents() + val x: String = .component1() /*!! String */ + val y: @FlexibleNullability String? = .component2() + use(x = x, y = y /*!! @FlexibleNullability String */) } fun test2Desugared() { - val tmp: Q<@FlexibleNullability String, String?>? = notNullComponents() - val x: @FlexibleNullability String = tmp.component1() - val y: String? = tmp.component2() - use(x = x, y = y /*!! String */) + val tmp: @FlexibleNullability Q<@EnhancedNullability String, @FlexibleNullability String?>? = notNullComponents() + val x: String = tmp.component1() /*!! String */ + val y: @FlexibleNullability String? = tmp.component2() + use(x = x, y = y /*!! @FlexibleNullability String */) } fun test3() { - val : Q<@FlexibleNullability String, String?> = notNullQAndComponents() /*!! Q<@FlexibleNullability String, String?> */ - val x: @FlexibleNullability String = .component1() - val y: String? = .component2() - use(x = x, y = y /*!! String */) + val : Q<@EnhancedNullability String, @FlexibleNullability String?> = notNullQAndComponents() /*!! Q<@EnhancedNullability String, @FlexibleNullability String?> */ + val x: String = .component1() /*!! String */ + val y: @FlexibleNullability String? = .component2() + use(x = x, y = y /*!! @FlexibleNullability String */) } fun test4() { - val : IndexedValue = listOfNotNull() /*!! List */.withIndex().first>() + val : IndexedValue<@FlexibleNullability P?> = listOfNotNull() /*!! @FlexibleNullability List<@FlexibleNullability P?> */.withIndex<@FlexibleNullability P?>().first>() val x: Int = .component1() - val y: P? = .component2() - use(x = x, y = y /*!! P */) + val y: @FlexibleNullability P? = .component2() + use(x = x, y = y /*!! @FlexibleNullability P */) } + diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.txt index b67f09ac012..dc41af6cb97 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.txt @@ -131,63 +131,66 @@ FILE fqName: fileName:/enhancedNullabilityInDestructuringAssignment.kt y: GET_VAR 'val y: kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? [val] - CALL 'public open fun notNullComponents (): .Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? declared in .J' type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? origin=null - VAR name:x type:@[FlexibleNullability] kotlin.String [val] - CALL 'public final fun component1 (): T1 of .Q [operator] declared in .Q' type=@[FlexibleNullability] kotlin.String origin=null - $this: GET_VAR 'val tmp_1: .Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? [val] declared in .test2' type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? origin=null - VAR name:y type:kotlin.String? [val] - CALL 'public final fun component2 (): T2 of .Q [operator] declared in .Q' type=kotlin.String? origin=null - $this: GET_VAR 'val tmp_1: .Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? [val] declared in .test2' type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:@[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? [val] + CALL 'public open fun notNullComponents (): @[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? declared in .J' type=@[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? origin=null + VAR name:x type:kotlin.String [val] + TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String + CALL 'public final fun component1 (): T1 of .Q [operator] declared in .Q' type=@[EnhancedNullability] kotlin.String origin=null + $this: GET_VAR 'val tmp_1: @[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? [val] declared in .test2' type=@[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? origin=null + VAR name:y type:@[FlexibleNullability] kotlin.String? [val] + CALL 'public final fun component2 (): T2 of .Q [operator] declared in .Q' type=@[FlexibleNullability] kotlin.String? origin=null + $this: GET_VAR 'val tmp_1: @[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? [val] declared in .test2' type=@[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? origin=null CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in ' type=kotlin.Unit origin=null - x: GET_VAR 'val x: @[FlexibleNullability] kotlin.String [val] declared in .test2' type=@[FlexibleNullability] kotlin.String origin=null - y: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - GET_VAR 'val y: kotlin.String? [val] declared in .test2' type=kotlin.String? origin=null + x: GET_VAR 'val x: kotlin.String [val] declared in .test2' type=kotlin.String origin=null + y: TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + GET_VAR 'val y: @[FlexibleNullability] kotlin.String? [val] declared in .test2' type=@[FlexibleNullability] kotlin.String? origin=null FUN name:test2Desugared visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR name:tmp type:.Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? [val] - CALL 'public open fun notNullComponents (): .Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? declared in .J' type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? origin=null - VAR name:x type:@[FlexibleNullability] kotlin.String [val] - CALL 'public final fun component1 (): T1 of .Q [operator] declared in .Q' type=@[FlexibleNullability] kotlin.String origin=null - $this: GET_VAR 'val tmp: .Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? [val] declared in .test2Desugared' type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? origin=null - VAR name:y type:kotlin.String? [val] - CALL 'public final fun component2 (): T2 of .Q [operator] declared in .Q' type=kotlin.String? origin=null - $this: GET_VAR 'val tmp: .Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? [val] declared in .test2Desugared' type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?>? origin=null + VAR name:tmp type:@[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? [val] + CALL 'public open fun notNullComponents (): @[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? declared in .J' type=@[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? origin=null + VAR name:x type:kotlin.String [val] + TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String + CALL 'public final fun component1 (): T1 of .Q [operator] declared in .Q' type=@[EnhancedNullability] kotlin.String origin=null + $this: GET_VAR 'val tmp: @[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? [val] declared in .test2Desugared' type=@[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? origin=null + VAR name:y type:@[FlexibleNullability] kotlin.String? [val] + CALL 'public final fun component2 (): T2 of .Q [operator] declared in .Q' type=@[FlexibleNullability] kotlin.String? origin=null + $this: GET_VAR 'val tmp: @[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? [val] declared in .test2Desugared' type=@[FlexibleNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?>? origin=null CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in ' type=kotlin.Unit origin=null - x: GET_VAR 'val x: @[FlexibleNullability] kotlin.String [val] declared in .test2Desugared' type=@[FlexibleNullability] kotlin.String origin=null - y: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - GET_VAR 'val y: kotlin.String? [val] declared in .test2Desugared' type=kotlin.String? origin=null + x: GET_VAR 'val x: kotlin.String [val] declared in .test2Desugared' type=kotlin.String origin=null + y: TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + GET_VAR 'val y: @[FlexibleNullability] kotlin.String? [val] declared in .test2Desugared' type=@[FlexibleNullability] kotlin.String? origin=null FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.Q<@[FlexibleNullability] kotlin.String, kotlin.String?> [val] - TYPE_OP type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?> origin=IMPLICIT_NOTNULL typeOperand=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?> - CALL 'public open fun notNullQAndComponents (): @[EnhancedNullability] .Q<@[FlexibleNullability] kotlin.String, kotlin.String?> declared in .J' type=@[EnhancedNullability] .Q<@[FlexibleNullability] kotlin.String, kotlin.String?> origin=null - VAR name:x type:@[FlexibleNullability] kotlin.String [val] - CALL 'public final fun component1 (): T1 of .Q [operator] declared in .Q' type=@[FlexibleNullability] kotlin.String origin=null - $this: GET_VAR 'val tmp_2: .Q<@[FlexibleNullability] kotlin.String, kotlin.String?> [val] declared in .test3' type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?> origin=null - VAR name:y type:kotlin.String? [val] - CALL 'public final fun component2 (): T2 of .Q [operator] declared in .Q' type=kotlin.String? origin=null - $this: GET_VAR 'val tmp_2: .Q<@[FlexibleNullability] kotlin.String, kotlin.String?> [val] declared in .test3' type=.Q<@[FlexibleNullability] kotlin.String, kotlin.String?> origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> [val] + TYPE_OP type=.Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> origin=IMPLICIT_NOTNULL typeOperand=.Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> + CALL 'public open fun notNullQAndComponents (): @[EnhancedNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> declared in .J' type=@[EnhancedNullability] .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> origin=null + VAR name:x type:kotlin.String [val] + TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String + CALL 'public final fun component1 (): T1 of .Q [operator] declared in .Q' type=@[EnhancedNullability] kotlin.String origin=null + $this: GET_VAR 'val tmp_2: .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> [val] declared in .test3' type=.Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> origin=null + VAR name:y type:@[FlexibleNullability] kotlin.String? [val] + CALL 'public final fun component2 (): T2 of .Q [operator] declared in .Q' type=@[FlexibleNullability] kotlin.String? origin=null + $this: GET_VAR 'val tmp_2: .Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> [val] declared in .test3' type=.Q<@[EnhancedNullability] kotlin.String, @[FlexibleNullability] kotlin.String?> origin=null CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in ' type=kotlin.Unit origin=null - x: GET_VAR 'val x: @[FlexibleNullability] kotlin.String [val] declared in .test3' type=@[FlexibleNullability] kotlin.String origin=null - y: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - GET_VAR 'val y: kotlin.String? [val] declared in .test3' type=kotlin.String? origin=null + x: GET_VAR 'val x: kotlin.String [val] declared in .test3' type=kotlin.String origin=null + y: TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + GET_VAR 'val y: @[FlexibleNullability] kotlin.String? [val] declared in .test3' type=@[FlexibleNullability] kotlin.String? origin=null FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.IndexedValue<.P?> [val] - CALL 'public final fun first (): T of kotlin.collections.CollectionsKt.first declared in kotlin.collections.CollectionsKt' type=kotlin.collections.IndexedValue<.P?> origin=null - : kotlin.collections.IndexedValue<.P?> - $receiver: CALL 'public final fun withIndex (): kotlin.collections.Iterable> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.Iterable.P?>> origin=null - : .P? - $receiver: TYPE_OP type=kotlin.collections.List<.P?> origin=IMPLICIT_NOTNULL typeOperand=kotlin.collections.List<.P?> - CALL 'public open fun listOfNotNull (): kotlin.collections.List<.P?>? declared in .J' type=kotlin.collections.List<.P?>? origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.IndexedValue<@[FlexibleNullability] .P?> [val] + CALL 'public final fun first (): T of kotlin.collections.CollectionsKt.first declared in kotlin.collections.CollectionsKt' type=kotlin.collections.IndexedValue<@[FlexibleNullability] .P?> origin=null + : kotlin.collections.IndexedValue<@[FlexibleNullability] .P?> + $receiver: CALL 'public final fun withIndex (): kotlin.collections.Iterable> declared in kotlin.collections.CollectionsKt' type=kotlin.collections.Iterable.P?>> origin=null + : @[FlexibleNullability] .P? + $receiver: TYPE_OP type=@[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?> origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?> + CALL 'public open fun listOfNotNull (): @[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? declared in .J' type=@[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? origin=null VAR name:x type:kotlin.Int [val] CALL 'public final fun component1 (): kotlin.Int [operator] declared in kotlin.collections.IndexedValue' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_3: kotlin.collections.IndexedValue<.P?> [val] declared in .test4' type=kotlin.collections.IndexedValue<.P?> origin=null - VAR name:y type:.P? [val] - CALL 'public final fun component2 (): T of kotlin.collections.IndexedValue [operator] declared in kotlin.collections.IndexedValue' type=.P? origin=null - $this: GET_VAR 'val tmp_3: kotlin.collections.IndexedValue<.P?> [val] declared in .test4' type=kotlin.collections.IndexedValue<.P?> origin=null + $this: GET_VAR 'val tmp_3: kotlin.collections.IndexedValue<@[FlexibleNullability] .P?> [val] declared in .test4' type=kotlin.collections.IndexedValue<@[FlexibleNullability] .P?> origin=null + VAR name:y type:@[FlexibleNullability] .P? [val] + CALL 'public final fun component2 (): T of kotlin.collections.IndexedValue [operator] declared in kotlin.collections.IndexedValue' type=@[FlexibleNullability] .P? origin=null + $this: GET_VAR 'val tmp_3: kotlin.collections.IndexedValue<@[FlexibleNullability] .P?> [val] declared in .test4' type=kotlin.collections.IndexedValue<@[FlexibleNullability] .P?> origin=null CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in ' type=kotlin.Unit origin=null x: GET_VAR 'val x: kotlin.Int [val] declared in .test4' type=kotlin.Int origin=null - y: TYPE_OP type=.P origin=IMPLICIT_NOTNULL typeOperand=.P - GET_VAR 'val y: .P? [val] declared in .test4' type=.P? origin=null + y: TYPE_OP type=@[FlexibleNullability] .P origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] .P + GET_VAR 'val y: @[FlexibleNullability] .P? [val] declared in .test4' type=@[FlexibleNullability] .P? origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt index 74cbc9be0fa..3a80807ad5c 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt @@ -3,18 +3,18 @@ fun use(s: P) { fun testForInListUnused() { { // BLOCK - val : MutableIterator = listOfNotNull().iterator() + val : MutableIterator<@FlexibleNullability P?> = listOfNotNull().iterator() while (.hasNext()) { // BLOCK - val x: P? = .next() + val x: @FlexibleNullability P? = .next() } } } fun testForInListDestructured() { { // BLOCK - val : MutableIterator = listOfNotNull().iterator() + val : MutableIterator<@FlexibleNullability P?> = listOfNotNull().iterator() while (.hasNext()) { // BLOCK - val : P? = .next() + val : @FlexibleNullability P? = .next() val x: Int = .component1() val y: Int = .component2() } @@ -22,27 +22,27 @@ fun testForInListDestructured() { } fun testDesugaredForInList() { - val iterator: MutableIterator = listOfNotNull().iterator() + val iterator: MutableIterator<@FlexibleNullability P?> = listOfNotNull().iterator() while (iterator.hasNext()) { // BLOCK - val x: P? = iterator.next() + val x: @FlexibleNullability P? = iterator.next() } } fun testForInArrayUnused(j: J) { { // BLOCK - val : Iterator = j.arrayOfNotNull().iterator() + val : Iterator<@FlexibleNullability P?> = j.arrayOfNotNull().iterator() while (.hasNext()) { // BLOCK - val x: P? = .next() + val x: @FlexibleNullability P? = .next() } } } fun testForInListUse() { { // BLOCK - val : MutableIterator = listOfNotNull().iterator() + val : MutableIterator<@FlexibleNullability P?> = listOfNotNull().iterator() while (.hasNext()) { // BLOCK - val x: P? = .next() - use(s = x /*!! P */) + val x: @FlexibleNullability P? = .next() + use(s = x /*!! @FlexibleNullability P */) use(s = x) } } @@ -50,10 +50,10 @@ fun testForInListUse() { fun testForInArrayUse(j: J) { { // BLOCK - val : Iterator = j.arrayOfNotNull().iterator() + val : Iterator<@FlexibleNullability P?> = j.arrayOfNotNull().iterator() while (.hasNext()) { // BLOCK - val x: P? = .next() - use(s = x /*!! P */) + val x: @FlexibleNullability P? = .next() + use(s = x /*!! @FlexibleNullability P */) use(s = x) } } @@ -119,3 +119,4 @@ data class P { } } + diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.txt index b8b589952e9..15af57bbe7b 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.txt @@ -5,100 +5,100 @@ FILE fqName: fileName:/enhancedNullabilityInForLoop.kt FUN name:testForInListUnused visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.MutableIterator<.P?> [val] - CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<.P?> origin=FOR_LOOP_ITERATOR - $this: CALL 'public open fun listOfNotNull (): kotlin.collections.List<.P?>? declared in .J' type=kotlin.collections.List<.P?>? origin=null + VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] + CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=FOR_LOOP_ITERATOR + $this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? declared in .J' type=@[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<.P?> [val] declared in .testForInListUnused' type=kotlin.collections.MutableIterator<.P?> origin=null + $this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] declared in .testForInListUnused' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:x type:.P? [val] - CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=.P? origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<.P?> [val] declared in .testForInListUnused' type=kotlin.collections.MutableIterator<.P?> origin=null + VAR FOR_LOOP_VARIABLE name:x type:@[FlexibleNullability] .P? [val] + CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=@[FlexibleNullability] .P? origin=FOR_LOOP_NEXT + $this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] declared in .testForInListUnused' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null FUN name:testForInListDestructured visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.MutableIterator<.P?> [val] - CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<.P?> origin=FOR_LOOP_ITERATOR - $this: CALL 'public open fun listOfNotNull (): kotlin.collections.List<.P?>? declared in .J' type=kotlin.collections.List<.P?>? origin=null + VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] + CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=FOR_LOOP_ITERATOR + $this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? declared in .J' type=@[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<.P?> [val] declared in .testForInListDestructured' type=kotlin.collections.MutableIterator<.P?> origin=null + $this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] declared in .testForInListDestructured' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name: type:.P? [val] - CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=.P? origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<.P?> [val] declared in .testForInListDestructured' type=kotlin.collections.MutableIterator<.P?> origin=null + VAR FOR_LOOP_VARIABLE name: type:@[FlexibleNullability] .P? [val] + CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=@[FlexibleNullability] .P? origin=FOR_LOOP_NEXT + $this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] declared in .testForInListDestructured' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null VAR name:x type:kotlin.Int [val] CALL 'public final fun component1 (): kotlin.Int [operator] declared in .P' type=kotlin.Int origin=null - $this: GET_VAR 'val : .P? [val] declared in .testForInListDestructured' type=.P? origin=null + $this: GET_VAR 'val : @[FlexibleNullability] .P? [val] declared in .testForInListDestructured' type=@[FlexibleNullability] .P? origin=null VAR name:y type:kotlin.Int [val] CALL 'public final fun component2 (): kotlin.Int [operator] declared in .P' type=kotlin.Int origin=null - $this: GET_VAR 'val : .P? [val] declared in .testForInListDestructured' type=.P? origin=null + $this: GET_VAR 'val : @[FlexibleNullability] .P? [val] declared in .testForInListDestructured' type=@[FlexibleNullability] .P? origin=null FUN name:testDesugaredForInList visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR name:iterator type:kotlin.collections.MutableIterator<.P?> [val] - CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<.P?> origin=null - $this: CALL 'public open fun listOfNotNull (): kotlin.collections.List<.P?>? declared in .J' type=kotlin.collections.List<.P?>? origin=null + VAR name:iterator type:kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] + CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null + $this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? declared in .J' type=@[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? origin=null WHILE label=null origin=WHILE_LOOP condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<.P?> [val] declared in .testDesugaredForInList' type=kotlin.collections.MutableIterator<.P?> origin=null + $this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] declared in .testDesugaredForInList' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null body: BLOCK type=kotlin.Unit origin=null - VAR name:x type:.P? [val] - CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=.P? origin=null - $this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<.P?> [val] declared in .testDesugaredForInList' type=kotlin.collections.MutableIterator<.P?> origin=null + VAR name:x type:@[FlexibleNullability] .P? [val] + CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=@[FlexibleNullability] .P? origin=null + $this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] declared in .testDesugaredForInList' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null FUN name:testForInArrayUnused visibility:public modality:FINAL <> (j:.J) returnType:kotlin.Unit VALUE_PARAMETER name:j index:0 type:.J BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.Iterator<.P?> [val] - CALL 'public final fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.Array' type=kotlin.collections.Iterator<.P?> origin=null - $this: CALL 'public open fun arrayOfNotNull (): kotlin.Array.P?> declared in .J' type=kotlin.Array.P?> origin=null + VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.Iterator<@[FlexibleNullability] .P?> [val] + CALL 'public final fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.Array' type=kotlin.collections.Iterator<@[FlexibleNullability] .P?> origin=null + $this: CALL 'public open fun arrayOfNotNull (): @[EnhancedNullability] kotlin.Array.P?> declared in .J' type=@[EnhancedNullability] kotlin.Array.P?> origin=null $this: GET_VAR 'j: .J declared in .testForInArrayUnused' type=.J origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<.P?> [val] declared in .testForInArrayUnused' type=kotlin.collections.Iterator<.P?> origin=null + $this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<@[FlexibleNullability] .P?> [val] declared in .testForInArrayUnused' type=kotlin.collections.Iterator<@[FlexibleNullability] .P?> origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:x type:.P? [val] - CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=.P? origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<.P?> [val] declared in .testForInArrayUnused' type=kotlin.collections.Iterator<.P?> origin=null + VAR FOR_LOOP_VARIABLE name:x type:@[FlexibleNullability] .P? [val] + CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=@[FlexibleNullability] .P? origin=FOR_LOOP_NEXT + $this: GET_VAR 'val tmp_2: kotlin.collections.Iterator<@[FlexibleNullability] .P?> [val] declared in .testForInArrayUnused' type=kotlin.collections.Iterator<@[FlexibleNullability] .P?> origin=null FUN name:testForInListUse visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_3 type:kotlin.collections.MutableIterator<.P?> [val] - CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<.P?> origin=FOR_LOOP_ITERATOR - $this: CALL 'public open fun listOfNotNull (): kotlin.collections.List<.P?>? declared in .J' type=kotlin.collections.List<.P?>? origin=null + VAR FOR_LOOP_ITERATOR name:tmp_3 type:kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] + CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=FOR_LOOP_ITERATOR + $this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? declared in .J' type=@[FlexibleNullability] kotlin.collections.List<@[FlexibleNullability] .P?>? origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_3: kotlin.collections.MutableIterator<.P?> [val] declared in .testForInListUse' type=kotlin.collections.MutableIterator<.P?> origin=null + $this: GET_VAR 'val tmp_3: kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] declared in .testForInListUse' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:x type:.P? [val] - CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=.P? origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_3: kotlin.collections.MutableIterator<.P?> [val] declared in .testForInListUse' type=kotlin.collections.MutableIterator<.P?> origin=null + VAR FOR_LOOP_VARIABLE name:x type:@[FlexibleNullability] .P? [val] + CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableIterator' type=@[FlexibleNullability] .P? origin=FOR_LOOP_NEXT + $this: GET_VAR 'val tmp_3: kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> [val] declared in .testForInListUse' type=kotlin.collections.MutableIterator<@[FlexibleNullability] .P?> origin=null CALL 'public final fun use (s: .P): kotlin.Unit declared in ' type=kotlin.Unit origin=null - s: TYPE_OP type=.P origin=IMPLICIT_NOTNULL typeOperand=.P - GET_VAR 'val x: .P? [val] declared in .testForInListUse' type=.P? origin=null + s: TYPE_OP type=@[FlexibleNullability] .P origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] .P + GET_VAR 'val x: @[FlexibleNullability] .P? [val] declared in .testForInListUse' type=@[FlexibleNullability] .P? origin=null CALL 'public open fun use (s: @[EnhancedNullability] .P): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - s: GET_VAR 'val x: .P? [val] declared in .testForInListUse' type=.P? origin=null + s: GET_VAR 'val x: @[FlexibleNullability] .P? [val] declared in .testForInListUse' type=@[FlexibleNullability] .P? origin=null FUN name:testForInArrayUse visibility:public modality:FINAL <> (j:.J) returnType:kotlin.Unit VALUE_PARAMETER name:j index:0 type:.J BLOCK_BODY BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_4 type:kotlin.collections.Iterator<.P?> [val] - CALL 'public final fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.Array' type=kotlin.collections.Iterator<.P?> origin=null - $this: CALL 'public open fun arrayOfNotNull (): kotlin.Array.P?> declared in .J' type=kotlin.Array.P?> origin=null + VAR FOR_LOOP_ITERATOR name:tmp_4 type:kotlin.collections.Iterator<@[FlexibleNullability] .P?> [val] + CALL 'public final fun iterator (): kotlin.collections.Iterator [operator] declared in kotlin.Array' type=kotlin.collections.Iterator<@[FlexibleNullability] .P?> origin=null + $this: CALL 'public open fun arrayOfNotNull (): @[EnhancedNullability] kotlin.Array.P?> declared in .J' type=@[EnhancedNullability] kotlin.Array.P?> origin=null $this: GET_VAR 'j: .J declared in .testForInArrayUse' type=.J origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_4: kotlin.collections.Iterator<.P?> [val] declared in .testForInArrayUse' type=kotlin.collections.Iterator<.P?> origin=null + $this: GET_VAR 'val tmp_4: kotlin.collections.Iterator<@[FlexibleNullability] .P?> [val] declared in .testForInArrayUse' type=kotlin.collections.Iterator<@[FlexibleNullability] .P?> origin=null body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:x type:.P? [val] - CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=.P? origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_4: kotlin.collections.Iterator<.P?> [val] declared in .testForInArrayUse' type=kotlin.collections.Iterator<.P?> origin=null + VAR FOR_LOOP_VARIABLE name:x type:@[FlexibleNullability] .P? [val] + CALL 'public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator' type=@[FlexibleNullability] .P? origin=FOR_LOOP_NEXT + $this: GET_VAR 'val tmp_4: kotlin.collections.Iterator<@[FlexibleNullability] .P?> [val] declared in .testForInArrayUse' type=kotlin.collections.Iterator<@[FlexibleNullability] .P?> origin=null CALL 'public final fun use (s: .P): kotlin.Unit declared in ' type=kotlin.Unit origin=null - s: TYPE_OP type=.P origin=IMPLICIT_NOTNULL typeOperand=.P - GET_VAR 'val x: .P? [val] declared in .testForInArrayUse' type=.P? origin=null + s: TYPE_OP type=@[FlexibleNullability] .P origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] .P + GET_VAR 'val x: @[FlexibleNullability] .P? [val] declared in .testForInArrayUse' type=@[FlexibleNullability] .P? origin=null CALL 'public open fun use (s: @[EnhancedNullability] .P): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - s: GET_VAR 'val x: .P? [val] declared in .testForInArrayUse' type=.P? origin=null + s: GET_VAR 'val x: @[FlexibleNullability] .P? [val] declared in .testForInArrayUse' type=@[FlexibleNullability] .P? origin=null CLASS INTERFACE name:K modality:ABSTRACT visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.K FUN name:arrayOfNotNull visibility:public modality:ABSTRACT <> ($this:.K) returnType:kotlin.Array<.P> diff --git a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.kt.txt index 4985c2b163c..1a112d26326 100644 --- a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.kt.txt @@ -11,7 +11,7 @@ fun JavaClass.testKotlinEqualsPlatform(): Boolean { } fun JavaClass.testPlatformCompareToPlatform(): Int { - return .null0().compareTo(other = .null0() /*!! Double */) + return .null0().compareTo(other = .null0() /*!! @FlexibleNullability Double */) } fun JavaClass.testPlatformCompareToKotlin(): Int { @@ -19,6 +19,6 @@ fun JavaClass.testPlatformCompareToKotlin(): Int { } fun JavaClass.testKotlinCompareToPlatform(): Int { - return 0.0.compareTo(other = .null0() /*!! Double */) + return 0.0.compareTo(other = .null0() /*!! @FlexibleNullability Double */) } diff --git a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt index f2665698e8b..59795c59904 100644 --- a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt @@ -4,16 +4,16 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsPlatform (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null + $this: CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsPlatform' type=.JavaClass origin=null - other: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null + other: CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsPlatform' type=.JavaClass origin=null FUN name:testPlatformEqualsKotlin visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Boolean $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsKotlin (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null + $this: CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsKotlin' type=.JavaClass origin=null other: CONST Double type=kotlin.Double value=0.0 FUN name:testKotlinEqualsPlatform visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Boolean @@ -22,24 +22,24 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv RETURN type=kotlin.Nothing from='public final fun testKotlinEqualsPlatform (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CONST Double type=kotlin.Double value=0.0 - other: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null + other: CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testKotlinEqualsPlatform' type=.JavaClass origin=null FUN name:testPlatformCompareToPlatform visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformCompareToPlatform (): kotlin.Int declared in ' CALL 'public open fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Double' type=kotlin.Int origin=null - $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null + $this: CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformCompareToPlatform' type=.JavaClass origin=null - other: TYPE_OP type=kotlin.Double origin=IMPLICIT_NOTNULL typeOperand=kotlin.Double - CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null + other: TYPE_OP type=@[FlexibleNullability] kotlin.Double origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.Double + CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformCompareToPlatform' type=.JavaClass origin=null FUN name:testPlatformCompareToKotlin visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformCompareToKotlin (): kotlin.Int declared in ' CALL 'public open fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Double' type=kotlin.Int origin=null - $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null + $this: CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformCompareToKotlin' type=.JavaClass origin=null other: CONST Double type=kotlin.Double value=0.0 FUN name:testKotlinCompareToPlatform visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Int @@ -48,6 +48,6 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv RETURN type=kotlin.Nothing from='public final fun testKotlinCompareToPlatform (): kotlin.Int declared in ' CALL 'public open fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Double' type=kotlin.Int origin=null $this: CONST Double type=kotlin.Double value=0.0 - other: TYPE_OP type=kotlin.Double origin=IMPLICIT_NOTNULL typeOperand=kotlin.Double - CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null + other: TYPE_OP type=@[FlexibleNullability] kotlin.Double origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.Double + CALL 'public open fun null0 (): @[FlexibleNullability] kotlin.Double? declared in .JavaClass' type=@[FlexibleNullability] kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testKotlinCompareToPlatform' type=.JavaClass origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.fir.kt.txt index cb7cf8d81b9..fd1f87d63ca 100644 --- a/compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.fir.kt.txt @@ -32,11 +32,11 @@ class MySet : Set { } fun test() { - f(s = s() /*!! String */) - f(s = #STRING /*!! String */) + f(s = s() /*!! @FlexibleNullability String */) + f(s = #STRING /*!! @FlexibleNullability String */) } fun testContains(m: MySet) { - m.contains(element = #STRING /*!! String */) /*~> Unit */ + m.contains(element = #STRING /*!! @FlexibleNullability String */) /*~> Unit */ m.contains(element = "abc") /*~> Unit */ } diff --git a/compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.fir.txt b/compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.fir.txt index dc5107feb34..ef5748bf9f4 100644 --- a/compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/implicitNotNullOnPlatformType.fir.txt @@ -63,19 +63,19 @@ FILE fqName: fileName:/implicitNotNullOnPlatformType.kt FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun f (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null - s: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun s (): kotlin.String? declared in .J' type=kotlin.String? origin=null + s: TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + CALL 'public open fun s (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null CALL 'public final fun f (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null - s: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:STRING type:kotlin.String? visibility:public [static]' type=kotlin.String? origin=GET_PROPERTY + s: TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:STRING type:@[FlexibleNullability] kotlin.String? visibility:public [static]' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY FUN name:testContains visibility:public modality:FINAL <> (m:.MySet) returnType:kotlin.Unit VALUE_PARAMETER name:m index:0 type:.MySet BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun contains (element: kotlin.String): kotlin.Boolean [operator] declared in .MySet' type=kotlin.Boolean origin=null $this: GET_VAR 'm: .MySet declared in .testContains' type=.MySet origin=null - element: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:STRING type:kotlin.String? visibility:public [static]' type=kotlin.String? origin=GET_PROPERTY + element: TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:STRING type:@[FlexibleNullability] kotlin.String? visibility:public [static]' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun contains (element: kotlin.String): kotlin.Boolean [operator] declared in .MySet' type=kotlin.Boolean origin=null $this: GET_VAR 'm: .MySet declared in .testContains' type=.MySet origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.fir.kt.txt deleted file mode 100644 index 98dece364c2..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.fir.kt.txt +++ /dev/null @@ -1,10 +0,0 @@ -fun useT(fn: Function0): T { - return fn.invoke() -} - -fun testNoNullCheck() { - useT(fn = local fun (): String? { - return string() - } -) /*~> Unit */ -} diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.fir.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.fir.txt deleted file mode 100644 index ce6b0044180..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.fir.txt +++ /dev/null @@ -1,18 +0,0 @@ -FILE fqName: fileName:/stringVsT.kt - FUN name:useT visibility:public modality:FINAL (fn:kotlin.Function0.useT>) returnType:T of .useT - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:fn index:0 type:kotlin.Function0.useT> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun useT (fn: kotlin.Function0.useT>): T of .useT declared in ' - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .useT origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function0.useT> declared in .useT' type=kotlin.Function0.useT> origin=VARIABLE_AS_FUNCTION - FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun useT (fn: kotlin.Function0.useT>): T of .useT declared in ' type=kotlin.String? origin=null - : kotlin.String? - fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .testNoNullCheck' - CALL 'public open fun string (): kotlin.String? declared in .J' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt index fb8aa91ffb1..87cc1df3ed3 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsT.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: stringVsT.kt fun useT(fn: () -> T) = fn() diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.fir.kt.txt deleted file mode 100644 index c0ce810e64c..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.fir.kt.txt +++ /dev/null @@ -1,10 +0,0 @@ -fun useTAny(fn: Function0): T { - return fn.invoke() -} - -fun testNoNullCheck() { - useTAny(fn = local fun (): String? { - return string() - } -) /*~> Unit */ -} diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.fir.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.fir.txt deleted file mode 100644 index 55c9a7ce568..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.fir.txt +++ /dev/null @@ -1,18 +0,0 @@ -FILE fqName: fileName:/stringVsTAny.kt - FUN name:useTAny visibility:public modality:FINAL (fn:kotlin.Function0.useTAny>) returnType:T of .useTAny - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] - VALUE_PARAMETER name:fn index:0 type:kotlin.Function0.useTAny> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun useTAny (fn: kotlin.Function0.useTAny>): T of .useTAny declared in ' - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .useTAny origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function0.useTAny> declared in .useTAny' type=kotlin.Function0.useTAny> origin=VARIABLE_AS_FUNCTION - FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun useTAny (fn: kotlin.Function0.useTAny>): T of .useTAny declared in ' type=kotlin.String? origin=null - : kotlin.String? - fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .testNoNullCheck' - CALL 'public open fun string (): kotlin.String? declared in .J' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt index c3de797ff94..b7d23f09765 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTAny.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: stringVsTAny.kt fun useTAny(fn: () -> T) = fn() diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.fir.kt.txt index f32e62d9a75..7686dc8a4bc 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.fir.kt.txt @@ -4,7 +4,7 @@ fun useTConstrained(xs: Array, fn: Function0): T { fun testWithNullCheck(xs: Array) { useTConstrained(xs = xs, fn = local fun (): String { - return string() /*!! String */ + return string() /*!! @FlexibleNullability String */ } ) /*~> Unit */ } diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.fir.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.fir.txt index d06da6b5448..5f318e3557c 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTConstrained.fir.txt @@ -18,5 +18,5 @@ FILE fqName: fileName:/stringVsTConstrained.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .testWithNullCheck' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun string (): kotlin.String? declared in .J' type=kotlin.String? origin=null + TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + CALL 'public open fun string (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.fir.kt.txt deleted file mode 100644 index a0f93bc18b4..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.fir.kt.txt +++ /dev/null @@ -1,11 +0,0 @@ -fun useTX(x: T, fn: Function0): T { - return fn.invoke() -} - -fun testNoNullCheck(xs: Array) { - useTX(x = xs, fn = local fun (): Serializable? { - return string() - } -) /*~> Unit */ -} - diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.fir.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.fir.txt deleted file mode 100644 index dda3f0be796..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.fir.txt +++ /dev/null @@ -1,21 +0,0 @@ -FILE fqName: fileName:/stringVsTXArray.kt - FUN name:useTX visibility:public modality:FINAL (x:T of .useTX, fn:kotlin.Function0.useTX>) returnType:T of .useTX - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:x index:0 type:T of .useTX - VALUE_PARAMETER name:fn index:1 type:kotlin.Function0.useTX> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun useTX (x: T of .useTX, fn: kotlin.Function0.useTX>): T of .useTX declared in ' - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .useTX origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function0.useTX> declared in .useTX' type=kotlin.Function0.useTX> origin=VARIABLE_AS_FUNCTION - FUN name:testNoNullCheck visibility:public modality:FINAL <> (xs:kotlin.Array) returnType:kotlin.Unit - VALUE_PARAMETER name:xs index:0 type:kotlin.Array - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun useTX (x: T of .useTX, fn: kotlin.Function0.useTX>): T of .useTX declared in ' type=java.io.Serializable? origin=null - : java.io.Serializable? - x: GET_VAR 'xs: kotlin.Array declared in .testNoNullCheck' type=kotlin.Array origin=null - fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:java.io.Serializable? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): java.io.Serializable? declared in .testNoNullCheck' - CALL 'public open fun string (): kotlin.String? declared in .J' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt index bd624e94ce0..5ad0c9ca974 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXArray.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: stringVsTXArray.kt fun useTX(x: T, fn: () -> T) = fn() diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.fir.kt.txt deleted file mode 100644 index 29ddc0f90e3..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.fir.kt.txt +++ /dev/null @@ -1,10 +0,0 @@ -fun useTX(x: T, fn: Function0): T { - return fn.invoke() -} - -fun testNoNullCheck() { - useTX(x = "", fn = local fun (): String? { - return string() - } -) /*~> Unit */ -} diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.fir.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.fir.txt deleted file mode 100644 index 893a282df0f..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.fir.txt +++ /dev/null @@ -1,20 +0,0 @@ -FILE fqName: fileName:/stringVsTXString.kt - FUN name:useTX visibility:public modality:FINAL (x:T of .useTX, fn:kotlin.Function0.useTX>) returnType:T of .useTX - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] - VALUE_PARAMETER name:x index:0 type:T of .useTX - VALUE_PARAMETER name:fn index:1 type:kotlin.Function0.useTX> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun useTX (x: T of .useTX, fn: kotlin.Function0.useTX>): T of .useTX declared in ' - CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .useTX origin=INVOKE - $this: GET_VAR 'fn: kotlin.Function0.useTX> declared in .useTX' type=kotlin.Function0.useTX> origin=VARIABLE_AS_FUNCTION - FUN name:testNoNullCheck visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun useTX (x: T of .useTX, fn: kotlin.Function0.useTX>): T of .useTX declared in ' type=kotlin.String? origin=null - : kotlin.String? - x: CONST String type=kotlin.String value="" - fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .testNoNullCheck' - CALL 'public open fun string (): kotlin.String? declared in .J' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt index c4140d09fd9..18143bb1a32 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/stringVsTXString.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: stringVsTXString.kt fun useTX(x: T, fn: () -> T) = fn() diff --git a/compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.fir.kt.txt index 13b5113cbc9..be54d5cb795 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.fir.kt.txt @@ -14,9 +14,9 @@ class C { } fun testExt() { - s() /*!! String */.extension() + s() /*!! @FlexibleNullability String */.extension() } fun C.testMemberExt() { - (, s() /*!! String */).memberExtension() + (, s() /*!! @FlexibleNullability String */).memberExtension() } diff --git a/compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.fir.txt index e9ca8d32ba0..bd555558530 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullabilityAssertionOnExtensionReceiver.fir.txt @@ -28,12 +28,12 @@ FILE fqName: fileName:/nullabilityAssertionOnExtensionReceiver.kt FUN name:testExt visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun extension (): kotlin.Unit declared in ' type=kotlin.Unit origin=null - $receiver: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun s (): kotlin.String? declared in .J' type=kotlin.String? origin=null + $receiver: TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + CALL 'public open fun s (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null FUN name:testMemberExt visibility:public modality:FINAL <> ($receiver:.C) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.C BLOCK_BODY CALL 'public final fun memberExtension (): kotlin.Unit declared in .C' type=kotlin.Unit origin=null $this: GET_VAR ': .C declared in .testMemberExt' type=.C origin=null - $receiver: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public open fun s (): kotlin.String? declared in .J' type=kotlin.String? origin=null + $receiver: TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + CALL 'public open fun s (): @[FlexibleNullability] kotlin.String? declared in .J' type=@[FlexibleNullability] kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt index 54a0a35dedb..cd34dcf7523 100644 --- a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt @@ -3,11 +3,11 @@ FILE fqName: fileName:/platformTypeReceiver.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:BOOL_NULL type:kotlin.Boolean? visibility:public [static]' type=kotlin.Boolean? origin=GET_PROPERTY + $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:BOOL_NULL type:@[FlexibleNullability] kotlin.Boolean? visibility:public [static]' type=@[FlexibleNullability] kotlin.Boolean? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: CALL 'public open fun boolNull (): kotlin.Boolean? declared in .J' type=kotlin.Boolean? origin=null + $this: CALL 'public open fun boolNull (): @[FlexibleNullability] kotlin.Boolean? declared in .J' type=@[FlexibleNullability] kotlin.Boolean? origin=null other: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/types/rawTypeInSignature.fir.kt.txt b/compiler/testData/ir/irText/types/rawTypeInSignature.fir.kt.txt index 328be181702..e46e3865c38 100644 --- a/compiler/testData/ir/irText/types/rawTypeInSignature.fir.kt.txt +++ b/compiler/testData/ir/irText/types/rawTypeInSignature.fir.kt.txt @@ -25,15 +25,15 @@ class GenericOut { } -fun testReturnsRawGenericInv(j: JRaw): GenericInv<*>? { +fun testReturnsRawGenericInv(j: JRaw): @FlexibleNullability GenericInv<*>? { return j.returnsRawGenericInv() } -fun testReturnsRawGenericIn(j: JRaw): GenericIn? { +fun testReturnsRawGenericIn(j: JRaw): @FlexibleNullability GenericIn? { return j.returnsRawGenericIn() } -fun testReturnsRawGenericOut(j: JRaw): GenericOut<*>? { +fun testReturnsRawGenericOut(j: JRaw): @FlexibleNullability GenericOut<*>? { return j.returnsRawGenericOut() } @@ -44,38 +44,39 @@ class KRaw : JRaw { } - override fun takesRawList(list: List<*>?) { + override fun takesRawList(list: @FlexibleNullability List<*>?) { .#<$$delegate_0>.takesRawList(list = list) } - override fun returnsRawList(): List<*>? { + override fun returnsRawList(): @FlexibleNullability List<*>? { return .#<$$delegate_0>.returnsRawList() } - override fun takesRawGenericInv(g: GenericInv<*>?) { + override fun takesRawGenericInv(g: @FlexibleNullability GenericInv<*>?) { .#<$$delegate_0>.takesRawGenericInv(g = g) } - override fun returnsRawGenericInv(): GenericInv<*>? { + override fun returnsRawGenericInv(): @FlexibleNullability GenericInv<*>? { return .#<$$delegate_0>.returnsRawGenericInv() } - override fun takesRawGenericIn(g: GenericIn?) { + override fun takesRawGenericIn(g: @FlexibleNullability GenericIn?) { .#<$$delegate_0>.takesRawGenericIn(g = g) } - override fun returnsRawGenericIn(): GenericIn? { + override fun returnsRawGenericIn(): @FlexibleNullability GenericIn? { return .#<$$delegate_0>.returnsRawGenericIn() } - override fun takesRawGenericOut(g: GenericOut<*>?) { + override fun takesRawGenericOut(g: @FlexibleNullability GenericOut<*>?) { .#<$$delegate_0>.takesRawGenericOut(g = g) } - override fun returnsRawGenericOut(): GenericOut<*>? { + override fun returnsRawGenericOut(): @FlexibleNullability GenericOut<*>? { return .#<$$delegate_0>.returnsRawGenericOut() } local /* final field */ val <$$delegate_0>: JRaw = j } + diff --git a/compiler/testData/ir/irText/types/rawTypeInSignature.fir.txt b/compiler/testData/ir/irText/types/rawTypeInSignature.fir.txt index fe8a7ab340b..6d185db4a66 100644 --- a/compiler/testData/ir/irText/types/rawTypeInSignature.fir.txt +++ b/compiler/testData/ir/irText/types/rawTypeInSignature.fir.txt @@ -59,23 +59,23 @@ FILE fqName: fileName:/rawTypeInSignature.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:testReturnsRawGenericInv visibility:public modality:FINAL <> (j:.JRaw) returnType:.GenericInv<*>? + FUN name:testReturnsRawGenericInv visibility:public modality:FINAL <> (j:.JRaw) returnType:@[FlexibleNullability] .GenericInv<*>? VALUE_PARAMETER name:j index:0 type:.JRaw BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testReturnsRawGenericInv (j: .JRaw): .GenericInv<*>? declared in ' - CALL 'public abstract fun returnsRawGenericInv (): .GenericInv<*>? declared in .JRaw' type=.GenericInv<*>? origin=null + RETURN type=kotlin.Nothing from='public final fun testReturnsRawGenericInv (j: .JRaw): @[FlexibleNullability] .GenericInv<*>? declared in ' + CALL 'public abstract fun returnsRawGenericInv (): @[FlexibleNullability] .GenericInv<*>? declared in .JRaw' type=@[FlexibleNullability] .GenericInv<*>? origin=null $this: GET_VAR 'j: .JRaw declared in .testReturnsRawGenericInv' type=.JRaw origin=null - FUN name:testReturnsRawGenericIn visibility:public modality:FINAL <> (j:.JRaw) returnType:.GenericIn? + FUN name:testReturnsRawGenericIn visibility:public modality:FINAL <> (j:.JRaw) returnType:@[FlexibleNullability] .GenericIn? VALUE_PARAMETER name:j index:0 type:.JRaw BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testReturnsRawGenericIn (j: .JRaw): .GenericIn? declared in ' - CALL 'public abstract fun returnsRawGenericIn (): .GenericIn? declared in .JRaw' type=.GenericIn? origin=null + RETURN type=kotlin.Nothing from='public final fun testReturnsRawGenericIn (j: .JRaw): @[FlexibleNullability] .GenericIn? declared in ' + CALL 'public abstract fun returnsRawGenericIn (): @[FlexibleNullability] .GenericIn? declared in .JRaw' type=@[FlexibleNullability] .GenericIn? origin=null $this: GET_VAR 'j: .JRaw declared in .testReturnsRawGenericIn' type=.JRaw origin=null - FUN name:testReturnsRawGenericOut visibility:public modality:FINAL <> (j:.JRaw) returnType:.GenericOut<*>? + FUN name:testReturnsRawGenericOut visibility:public modality:FINAL <> (j:.JRaw) returnType:@[FlexibleNullability] .GenericOut<*>? VALUE_PARAMETER name:j index:0 type:.JRaw BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testReturnsRawGenericOut (j: .JRaw): .GenericOut<*>? declared in ' - CALL 'public abstract fun returnsRawGenericOut (): .GenericOut<*>? declared in .JRaw' type=.GenericOut<*>? origin=null + RETURN type=kotlin.Nothing from='public final fun testReturnsRawGenericOut (j: .JRaw): @[FlexibleNullability] .GenericOut<*>? declared in ' + CALL 'public abstract fun returnsRawGenericOut (): @[FlexibleNullability] .GenericOut<*>? declared in .JRaw' type=@[FlexibleNullability] .GenericOut<*>? origin=null $this: GET_VAR 'j: .JRaw declared in .testReturnsRawGenericOut' type=.JRaw origin=null CLASS CLASS name:KRaw modality:FINAL visibility:public superTypes:[.JRaw] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.KRaw @@ -84,80 +84,80 @@ FILE fqName: fileName:/rawTypeInSignature.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:KRaw modality:FINAL visibility:public superTypes:[.JRaw]' - FUN DELEGATED_MEMBER name:takesRawList visibility:public modality:OPEN <> ($this:.KRaw, list:kotlin.collections.List<*>?) returnType:kotlin.Unit + FUN DELEGATED_MEMBER name:takesRawList visibility:public modality:OPEN <> ($this:.KRaw, list:@[FlexibleNullability] kotlin.collections.List<*>?) returnType:kotlin.Unit overridden: - public abstract fun takesRawList (list: kotlin.collections.List<*>?): kotlin.Unit declared in .JRaw + public abstract fun takesRawList (list: @[FlexibleNullability] kotlin.collections.List<*>?): kotlin.Unit declared in .JRaw $this: VALUE_PARAMETER name: type:.KRaw - VALUE_PARAMETER name:list index:0 type:kotlin.collections.List<*>? + VALUE_PARAMETER name:list index:0 type:@[FlexibleNullability] kotlin.collections.List<*>? BLOCK_BODY - CALL 'public abstract fun takesRawList (list: kotlin.collections.List<*>?): kotlin.Unit declared in .JRaw' type=kotlin.Unit origin=null + CALL 'public abstract fun takesRawList (list: @[FlexibleNullability] kotlin.collections.List<*>?): kotlin.Unit declared in .JRaw' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final]' type=.JRaw origin=null receiver: GET_VAR ': .KRaw declared in .KRaw.takesRawList' type=.KRaw origin=null - list: GET_VAR 'list: kotlin.collections.List<*>? declared in .KRaw.takesRawList' type=kotlin.collections.List<*>? origin=null - FUN DELEGATED_MEMBER name:returnsRawList visibility:public modality:OPEN <> ($this:.KRaw) returnType:kotlin.collections.List<*>? + list: GET_VAR 'list: @[FlexibleNullability] kotlin.collections.List<*>? declared in .KRaw.takesRawList' type=@[FlexibleNullability] kotlin.collections.List<*>? origin=null + FUN DELEGATED_MEMBER name:returnsRawList visibility:public modality:OPEN <> ($this:.KRaw) returnType:@[FlexibleNullability] kotlin.collections.List<*>? overridden: - public abstract fun returnsRawList (): kotlin.collections.List<*>? declared in .JRaw + public abstract fun returnsRawList (): @[FlexibleNullability] kotlin.collections.List<*>? declared in .JRaw $this: VALUE_PARAMETER name: type:.KRaw BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun returnsRawList (): kotlin.collections.List<*>? declared in .KRaw' - CALL 'public abstract fun returnsRawList (): kotlin.collections.List<*>? declared in .JRaw' type=kotlin.collections.List<*>? origin=null + RETURN type=kotlin.Nothing from='public open fun returnsRawList (): @[FlexibleNullability] kotlin.collections.List<*>? declared in .KRaw' + CALL 'public abstract fun returnsRawList (): @[FlexibleNullability] kotlin.collections.List<*>? declared in .JRaw' type=@[FlexibleNullability] kotlin.collections.List<*>? origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final]' type=.JRaw origin=null receiver: GET_VAR ': .KRaw declared in .KRaw.returnsRawList' type=.KRaw origin=null - FUN DELEGATED_MEMBER name:takesRawGenericInv visibility:public modality:OPEN <> ($this:.KRaw, g:.GenericInv<*>?) returnType:kotlin.Unit + FUN DELEGATED_MEMBER name:takesRawGenericInv visibility:public modality:OPEN <> ($this:.KRaw, g:@[FlexibleNullability] .GenericInv<*>?) returnType:kotlin.Unit overridden: - public abstract fun takesRawGenericInv (g: .GenericInv<*>?): kotlin.Unit declared in .JRaw + public abstract fun takesRawGenericInv (g: @[FlexibleNullability] .GenericInv<*>?): kotlin.Unit declared in .JRaw $this: VALUE_PARAMETER name: type:.KRaw - VALUE_PARAMETER name:g index:0 type:.GenericInv<*>? + VALUE_PARAMETER name:g index:0 type:@[FlexibleNullability] .GenericInv<*>? BLOCK_BODY - CALL 'public abstract fun takesRawGenericInv (g: .GenericInv<*>?): kotlin.Unit declared in .JRaw' type=kotlin.Unit origin=null + CALL 'public abstract fun takesRawGenericInv (g: @[FlexibleNullability] .GenericInv<*>?): kotlin.Unit declared in .JRaw' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final]' type=.JRaw origin=null receiver: GET_VAR ': .KRaw declared in .KRaw.takesRawGenericInv' type=.KRaw origin=null - g: GET_VAR 'g: .GenericInv<*>? declared in .KRaw.takesRawGenericInv' type=.GenericInv<*>? origin=null - FUN DELEGATED_MEMBER name:returnsRawGenericInv visibility:public modality:OPEN <> ($this:.KRaw) returnType:.GenericInv<*>? + g: GET_VAR 'g: @[FlexibleNullability] .GenericInv<*>? declared in .KRaw.takesRawGenericInv' type=@[FlexibleNullability] .GenericInv<*>? origin=null + FUN DELEGATED_MEMBER name:returnsRawGenericInv visibility:public modality:OPEN <> ($this:.KRaw) returnType:@[FlexibleNullability] .GenericInv<*>? overridden: - public abstract fun returnsRawGenericInv (): .GenericInv<*>? declared in .JRaw + public abstract fun returnsRawGenericInv (): @[FlexibleNullability] .GenericInv<*>? declared in .JRaw $this: VALUE_PARAMETER name: type:.KRaw BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun returnsRawGenericInv (): .GenericInv<*>? declared in .KRaw' - CALL 'public abstract fun returnsRawGenericInv (): .GenericInv<*>? declared in .JRaw' type=.GenericInv<*>? origin=null + RETURN type=kotlin.Nothing from='public open fun returnsRawGenericInv (): @[FlexibleNullability] .GenericInv<*>? declared in .KRaw' + CALL 'public abstract fun returnsRawGenericInv (): @[FlexibleNullability] .GenericInv<*>? declared in .JRaw' type=@[FlexibleNullability] .GenericInv<*>? origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final]' type=.JRaw origin=null receiver: GET_VAR ': .KRaw declared in .KRaw.returnsRawGenericInv' type=.KRaw origin=null - FUN DELEGATED_MEMBER name:takesRawGenericIn visibility:public modality:OPEN <> ($this:.KRaw, g:.GenericIn?) returnType:kotlin.Unit + FUN DELEGATED_MEMBER name:takesRawGenericIn visibility:public modality:OPEN <> ($this:.KRaw, g:@[FlexibleNullability] .GenericIn?) returnType:kotlin.Unit overridden: - public abstract fun takesRawGenericIn (g: .GenericIn?): kotlin.Unit declared in .JRaw + public abstract fun takesRawGenericIn (g: @[FlexibleNullability] .GenericIn?): kotlin.Unit declared in .JRaw $this: VALUE_PARAMETER name: type:.KRaw - VALUE_PARAMETER name:g index:0 type:.GenericIn? + VALUE_PARAMETER name:g index:0 type:@[FlexibleNullability] .GenericIn? BLOCK_BODY - CALL 'public abstract fun takesRawGenericIn (g: .GenericIn?): kotlin.Unit declared in .JRaw' type=kotlin.Unit origin=null + CALL 'public abstract fun takesRawGenericIn (g: @[FlexibleNullability] .GenericIn?): kotlin.Unit declared in .JRaw' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final]' type=.JRaw origin=null receiver: GET_VAR ': .KRaw declared in .KRaw.takesRawGenericIn' type=.KRaw origin=null - g: GET_VAR 'g: .GenericIn? declared in .KRaw.takesRawGenericIn' type=.GenericIn? origin=null - FUN DELEGATED_MEMBER name:returnsRawGenericIn visibility:public modality:OPEN <> ($this:.KRaw) returnType:.GenericIn? + g: GET_VAR 'g: @[FlexibleNullability] .GenericIn? declared in .KRaw.takesRawGenericIn' type=@[FlexibleNullability] .GenericIn? origin=null + FUN DELEGATED_MEMBER name:returnsRawGenericIn visibility:public modality:OPEN <> ($this:.KRaw) returnType:@[FlexibleNullability] .GenericIn? overridden: - public abstract fun returnsRawGenericIn (): .GenericIn? declared in .JRaw + public abstract fun returnsRawGenericIn (): @[FlexibleNullability] .GenericIn? declared in .JRaw $this: VALUE_PARAMETER name: type:.KRaw BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun returnsRawGenericIn (): .GenericIn? declared in .KRaw' - CALL 'public abstract fun returnsRawGenericIn (): .GenericIn? declared in .JRaw' type=.GenericIn? origin=null + RETURN type=kotlin.Nothing from='public open fun returnsRawGenericIn (): @[FlexibleNullability] .GenericIn? declared in .KRaw' + CALL 'public abstract fun returnsRawGenericIn (): @[FlexibleNullability] .GenericIn? declared in .JRaw' type=@[FlexibleNullability] .GenericIn? origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final]' type=.JRaw origin=null receiver: GET_VAR ': .KRaw declared in .KRaw.returnsRawGenericIn' type=.KRaw origin=null - FUN DELEGATED_MEMBER name:takesRawGenericOut visibility:public modality:OPEN <> ($this:.KRaw, g:.GenericOut<*>?) returnType:kotlin.Unit + FUN DELEGATED_MEMBER name:takesRawGenericOut visibility:public modality:OPEN <> ($this:.KRaw, g:@[FlexibleNullability] .GenericOut<*>?) returnType:kotlin.Unit overridden: - public abstract fun takesRawGenericOut (g: .GenericOut<*>?): kotlin.Unit declared in .JRaw + public abstract fun takesRawGenericOut (g: @[FlexibleNullability] .GenericOut<*>?): kotlin.Unit declared in .JRaw $this: VALUE_PARAMETER name: type:.KRaw - VALUE_PARAMETER name:g index:0 type:.GenericOut<*>? + VALUE_PARAMETER name:g index:0 type:@[FlexibleNullability] .GenericOut<*>? BLOCK_BODY - CALL 'public abstract fun takesRawGenericOut (g: .GenericOut<*>?): kotlin.Unit declared in .JRaw' type=kotlin.Unit origin=null + CALL 'public abstract fun takesRawGenericOut (g: @[FlexibleNullability] .GenericOut<*>?): kotlin.Unit declared in .JRaw' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final]' type=.JRaw origin=null receiver: GET_VAR ': .KRaw declared in .KRaw.takesRawGenericOut' type=.KRaw origin=null - g: GET_VAR 'g: .GenericOut<*>? declared in .KRaw.takesRawGenericOut' type=.GenericOut<*>? origin=null - FUN DELEGATED_MEMBER name:returnsRawGenericOut visibility:public modality:OPEN <> ($this:.KRaw) returnType:.GenericOut<*>? + g: GET_VAR 'g: @[FlexibleNullability] .GenericOut<*>? declared in .KRaw.takesRawGenericOut' type=@[FlexibleNullability] .GenericOut<*>? origin=null + FUN DELEGATED_MEMBER name:returnsRawGenericOut visibility:public modality:OPEN <> ($this:.KRaw) returnType:@[FlexibleNullability] .GenericOut<*>? overridden: - public abstract fun returnsRawGenericOut (): .GenericOut<*>? declared in .JRaw + public abstract fun returnsRawGenericOut (): @[FlexibleNullability] .GenericOut<*>? declared in .JRaw $this: VALUE_PARAMETER name: type:.KRaw BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun returnsRawGenericOut (): .GenericOut<*>? declared in .KRaw' - CALL 'public abstract fun returnsRawGenericOut (): .GenericOut<*>? declared in .JRaw' type=.GenericOut<*>? origin=null + RETURN type=kotlin.Nothing from='public open fun returnsRawGenericOut (): @[FlexibleNullability] .GenericOut<*>? declared in .KRaw' + CALL 'public abstract fun returnsRawGenericOut (): @[FlexibleNullability] .GenericOut<*>? declared in .JRaw' type=@[FlexibleNullability] .GenericOut<*>? origin=null $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final]' type=.JRaw origin=null receiver: GET_VAR ': .KRaw declared in .KRaw.returnsRawGenericOut' type=.KRaw origin=null FIELD DELEGATE name:<$$delegate_0> type:.JRaw visibility:local [final] diff --git a/compiler/testData/ir/irText/types/receiverOfIntersectionType.fir.kt.txt b/compiler/testData/ir/irText/types/receiverOfIntersectionType.fir.kt.txt index b646192135e..dd1736682bc 100644 --- a/compiler/testData/ir/irText/types/receiverOfIntersectionType.fir.kt.txt +++ b/compiler/testData/ir/irText/types/receiverOfIntersectionType.fir.kt.txt @@ -53,8 +53,8 @@ fun testFlexible1() { fun testFlexible2(a: A, b: B) { val v: I? = when { - true -> id(x = a) - else -> id(x = b) + true -> id<@FlexibleNullability A?>(x = a) + else -> id<@FlexibleNullability B?>(x = b) } v.ff() } diff --git a/compiler/testData/ir/irText/types/receiverOfIntersectionType.fir.txt b/compiler/testData/ir/irText/types/receiverOfIntersectionType.fir.txt index fa655228cc0..71930f67319 100644 --- a/compiler/testData/ir/irText/types/receiverOfIntersectionType.fir.txt +++ b/compiler/testData/ir/irText/types/receiverOfIntersectionType.fir.txt @@ -120,10 +120,10 @@ FILE fqName: fileName:/receiverOfIntersectionType.kt WHEN type=.I? origin=IF BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun a (): .A? declared in .Java' type=.A? origin=null + then: CALL 'public open fun a (): @[FlexibleNullability] .A? declared in .Java' type=@[FlexibleNullability] .A? origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun b (): .B? declared in .Java' type=.B? origin=null + then: CALL 'public open fun b (): @[FlexibleNullability] .B? declared in .Java' type=@[FlexibleNullability] .B? origin=null CALL 'public abstract fun ff (): kotlin.Unit declared in .I' type=kotlin.Unit origin=null $this: GET_VAR 'val v: .I? [val] declared in .testFlexible1' type=.I? origin=null FUN name:testFlexible2 visibility:public modality:FINAL <> (a:.A, b:.B) returnType:kotlin.Unit @@ -134,13 +134,13 @@ FILE fqName: fileName:/receiverOfIntersectionType.kt WHEN type=.I? origin=IF BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun id (x: T of .Java.id?): T of .Java.id? declared in .Java' type=.A? origin=null - : .A? + then: CALL 'public open fun id (x: @[FlexibleNullability] T of .Java.id?): @[FlexibleNullability] T of .Java.id? declared in .Java' type=@[FlexibleNullability] .A? origin=null + : @[FlexibleNullability] .A? x: GET_VAR 'a: .A declared in .testFlexible2' type=.A origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun id (x: T of .Java.id?): T of .Java.id? declared in .Java' type=.B? origin=null - : .B? + then: CALL 'public open fun id (x: @[FlexibleNullability] T of .Java.id?): @[FlexibleNullability] T of .Java.id? declared in .Java' type=@[FlexibleNullability] .B? origin=null + : @[FlexibleNullability] .B? x: GET_VAR 'b: .B declared in .testFlexible2' type=.B origin=null CALL 'public abstract fun ff (): kotlin.Unit declared in .I' type=kotlin.Unit origin=null $this: GET_VAR 'val v: .I? [val] declared in .testFlexible2' type=.I? origin=null diff --git a/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.kt.txt b/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.kt.txt index 9f4b5251168..754333fe89d 100644 --- a/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.kt.txt +++ b/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.kt.txt @@ -6,5 +6,5 @@ fun testSetField(a: Any, b: Any) { fun testGetField(a: Any): String { a as JCell /*~> Unit */ - return a /*as JCell */.#value /*!! String */ + return a /*as JCell */.#value /*!! @FlexibleNullability String */ } diff --git a/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.txt b/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.txt index 8c9701788ee..6235052494e 100644 --- a/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.txt +++ b/compiler/testData/ir/irText/types/smartCastOnFieldReceiverOfGenericType.fir.txt @@ -9,7 +9,7 @@ FILE fqName: fileName:/smartCastOnFieldReceiverOfGenericType.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String GET_VAR 'b: kotlin.Any declared in .testSetField' type=kotlin.Any origin=null - SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:T of .JCell? visibility:public' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:@[FlexibleNullability] T of .JCell? visibility:public' type=kotlin.Unit origin=EQ receiver: TYPE_OP type=.JCell origin=IMPLICIT_CAST typeOperand=.JCell GET_VAR 'a: kotlin.Any declared in .testSetField' type=kotlin.Any origin=null value: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String @@ -21,7 +21,7 @@ FILE fqName: fileName:/smartCastOnFieldReceiverOfGenericType.kt TYPE_OP type=.JCell origin=CAST typeOperand=.JCell GET_VAR 'a: kotlin.Any declared in .testGetField' type=kotlin.Any origin=null RETURN type=kotlin.Nothing from='public final fun testGetField (a: kotlin.Any): kotlin.String declared in ' - TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:T of .JCell? visibility:public' type=kotlin.String? origin=GET_PROPERTY + TYPE_OP type=@[FlexibleNullability] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleNullability] kotlin.String + GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:@[FlexibleNullability] T of .JCell? visibility:public' type=@[FlexibleNullability] kotlin.String? origin=GET_PROPERTY receiver: TYPE_OP type=.JCell origin=IMPLICIT_CAST typeOperand=.JCell GET_VAR 'a: kotlin.Any declared in .testGetField' type=kotlin.Any origin=null diff --git a/compiler/testData/loadJava/compiledJava/ArrayInGenericArguments.fir.txt b/compiler/testData/loadJava/compiledJava/ArrayInGenericArguments.fir.txt index 5ad1da0e20c..cd7c38e68a5 100644 --- a/compiler/testData/loadJava/compiledJava/ArrayInGenericArguments.fir.txt +++ b/compiler/testData/loadJava/compiledJava/ArrayInGenericArguments.fir.txt @@ -1,9 +1,9 @@ public open class ArrayInGenericArguments : R|kotlin/Any| { - public final static field X: R|ft<@FlexibleNullability ArrayInGenericArguments.DataKey!>, kotlin/Array!>?>!>, ArrayInGenericArguments.DataKey!>, kotlin/Array!>?>!>?>!| + public final static field X: R|ft!>, kotlin/Array!>?>!>, ArrayInGenericArguments.DataKey!>, kotlin/Array!>?>!>?>!| - public final static field Y: R|ft<@FlexibleNullability ArrayInGenericArguments.DataKey!>, ArrayInGenericArguments.DataKey!>?>!| + public final static field Y: R|ft!>, ArrayInGenericArguments.DataKey!>?>!| - public final static field Z: R|ft<@FlexibleNullability ArrayInGenericArguments.DataKey!>, kotlin/Array!>?>!>, ArrayInGenericArguments.DataKey!>, kotlin/Array!>?>!>?>!| + public final static field Z: R|ft!>, kotlin/Array!>?>!>, ArrayInGenericArguments.DataKey!>, kotlin/Array!>?>!>?>!| public constructor(): R|ArrayInGenericArguments| diff --git a/compiler/testData/loadJava/compiledJava/ArrayTypeVariance.fir.txt b/compiler/testData/loadJava/compiledJava/ArrayTypeVariance.fir.txt index 389ccc232f5..7aaf6f43345 100644 --- a/compiler/testData/loadJava/compiledJava/ArrayTypeVariance.fir.txt +++ b/compiler/testData/loadJava/compiledJava/ArrayTypeVariance.fir.txt @@ -1,5 +1,5 @@ public final class ArrayTypeVariance : R|kotlin/Any| { - public final fun toArray(p0: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!|): R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!| + public final fun toArray(p0: R|ft!>, kotlin/Array!>?>!|): R|ft!>, kotlin/Array!>?>!| public constructor(): R|test/ArrayTypeVariance| diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.fir.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.fir.txt index cebda2aeb12..8ae833f484d 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.fir.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.fir.txt @@ -1,4 +1,4 @@ -public abstract class ClassWithTypePExtendsIterableP

!|> : R|kotlin/Any|, R|kotlin/collections/MutableIterable!>| { +public abstract class ClassWithTypePExtendsIterableP

!|> : R|kotlin/Any|, R|kotlin/collections/MutableIterable!>| { public constructor

!|>(): R|test/ClassWithTypePExtendsIterableP

| } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePP.fir.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePP.fir.txt index 402b7b4ee7e..a273382fd72 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePP.fir.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePP.fir.txt @@ -1,4 +1,4 @@ -public final class ClassWithTypePP

!|, Q : R|ft<@FlexibleNullability P, P?>!|> : R|kotlin/Any| { - public constructor

!|, Q : R|ft<@FlexibleNullability P, P?>!|>(): R|test/ClassWithTypePP| +public final class ClassWithTypePP

!|, Q : R|ft!|> : R|kotlin/Any| { + public constructor

!|, Q : R|ft!|>(): R|test/ClassWithTypePP| } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.fir.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.fir.txt index 62a0efb6202..305d940481d 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.fir.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.fir.txt @@ -1,4 +1,4 @@ -public open class ClassWithTypePRefNext!>, kotlin/collections/Iterable!>?>!|, P : R|ft!|> : R|kotlin/Any| { - public constructor!>, kotlin/collections/Iterable!>?>!|, P : R|ft!|>(): R|test/ClassWithTypePRefNext| +public open class ClassWithTypePRefNext!>, kotlin/collections/Iterable!>?>!|, P : R|ft!|> : R|kotlin/Any| { + public constructor!>, kotlin/collections/Iterable!>?>!|, P : R|ft!|>(): R|test/ClassWithTypePRefNext| } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.fir.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.fir.txt index 6935b2c07da..a39791bd955 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.fir.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.fir.txt @@ -1,4 +1,4 @@ -public final class ClassWithTypePRefSelf

!>, kotlin/Enum!>?>!|> : R|kotlin/Any| { - public constructor

!>, kotlin/Enum!>?>!|>(): R|test/ClassWithTypePRefSelf

| +public final class ClassWithTypePRefSelf

!>, kotlin/Enum!>?>!|> : R|kotlin/Any| { + public constructor

!>, kotlin/Enum!>?>!|>(): R|test/ClassWithTypePRefSelf

| } diff --git a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.fir.txt b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.fir.txt index 12cf27aeb79..b0cbb2e56a2 100644 --- a/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.fir.txt +++ b/compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.fir.txt @@ -1,4 +1,4 @@ -public final class ClassWithTypePRefSelfAndClass

!>, test/ClassWithTypePRefSelfAndClass!>?>!|> : R|kotlin/Any| { - public constructor

!>, test/ClassWithTypePRefSelfAndClass!>?>!|>(): R|test/ClassWithTypePRefSelfAndClass

| +public final class ClassWithTypePRefSelfAndClass

!>, test/ClassWithTypePRefSelfAndClass!>?>!|> : R|kotlin/Any| { + public constructor

!>, test/ClassWithTypePRefSelfAndClass!>?>!|>(): R|test/ClassWithTypePRefSelfAndClass

| } diff --git a/compiler/testData/loadJava/compiledJava/FieldOfArrayType.fir.txt b/compiler/testData/loadJava/compiledJava/FieldOfArrayType.fir.txt index acbf867d40d..9099f9e09d0 100644 --- a/compiler/testData/loadJava/compiledJava/FieldOfArrayType.fir.txt +++ b/compiler/testData/loadJava/compiledJava/FieldOfArrayType.fir.txt @@ -1,5 +1,5 @@ public open class FieldOfArrayType : R|kotlin/Any| { - public open field files: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!| + public open field files: R|ft!>, kotlin/Array!>?>!| public constructor(): R|test/FieldOfArrayType| diff --git a/compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.fir.txt b/compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.fir.txt index dd3edda3592..b293bd0aaa1 100644 --- a/compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.fir.txt +++ b/compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.fir.txt @@ -1,5 +1,5 @@ public open class InnerClassTypeMultipleGeneric : R|kotlin/Any| { - public open fun staticType(): R|ft<@FlexibleNullability test/InnerClassTypeMultipleGeneric.Outer.Inner!, ft<@FlexibleNullability kotlin/Char, kotlin/Char?>!, ft<@FlexibleNullability kotlin/Boolean, kotlin/Boolean?>!>, test/InnerClassTypeMultipleGeneric.Outer.Inner!, ft<@FlexibleNullability kotlin/Char, kotlin/Char?>!, ft<@FlexibleNullability kotlin/Boolean, kotlin/Boolean?>!>?>!| + public open fun staticType(): R|ft!, ft!, ft!>, test/InnerClassTypeMultipleGeneric.Outer.Inner!, ft!, ft!>?>!| public constructor(): R|test/InnerClassTypeMultipleGeneric| diff --git a/compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.fir.txt b/compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.fir.txt index 0f1a4a066bf..aa254173084 100644 --- a/compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.fir.txt +++ b/compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.fir.txt @@ -1,12 +1,12 @@ public abstract interface IntrinsicCompanionObject : R|kotlin/Any| { - public abstract fun testInt(i: R|ft<@FlexibleNullability kotlin/Int.Companion, kotlin/Int.Companion?>!|): R|kotlin/Unit| + public abstract fun testInt(i: R|ft!|): R|kotlin/Unit| - public abstract fun testChar(c: R|ft<@FlexibleNullability kotlin/Char.Companion, kotlin/Char.Companion?>!|): R|kotlin/Unit| + public abstract fun testChar(c: R|ft!|): R|kotlin/Unit| - public abstract fun testString(s: R|ft<@FlexibleNullability kotlin/String.Companion, kotlin/String.Companion?>!|): R|kotlin/Unit| + public abstract fun testString(s: R|ft!|): R|kotlin/Unit| - public abstract fun testBoolean(b: R|ft<@FlexibleNullability kotlin/Boolean.Companion, kotlin/Boolean.Companion?>!|): R|kotlin/Unit| + public abstract fun testBoolean(b: R|ft!|): R|kotlin/Unit| - public abstract fun testEnum(e: R|ft<@FlexibleNullability kotlin/Enum.Companion, kotlin/Enum.Companion?>!|): R|kotlin/Unit| + public abstract fun testEnum(e: R|ft!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.fir.txt b/compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.fir.txt index def0cea1bb0..7172f1d7804 100644 --- a/compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.fir.txt +++ b/compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.fir.txt @@ -1,5 +1,5 @@ public open class MethodTypePOneUpperBound : R|kotlin/Any| { - public open fun !|> bar(): R|kotlin/Unit| + public open fun !|> bar(): R|kotlin/Unit| public constructor(): R|test/MethodTypePOneUpperBound| diff --git a/compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.fir.txt b/compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.fir.txt index 6e5a9521de4..bc1714d64ba 100644 --- a/compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.fir.txt +++ b/compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.fir.txt @@ -1,5 +1,5 @@ public open class MethodTypePTwoUpperBounds : R|kotlin/Any| { - public open fun !|, R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|> foo(): R|kotlin/Unit| + public open fun !|, R|ft!|> foo(): R|kotlin/Unit| public constructor(): R|test/MethodTypePTwoUpperBounds| diff --git a/compiler/testData/loadJava/compiledJava/MethodWithTypePP.fir.txt b/compiler/testData/loadJava/compiledJava/MethodWithTypePP.fir.txt index 9b9059e04d7..bf6866d07bc 100644 --- a/compiler/testData/loadJava/compiledJava/MethodWithTypePP.fir.txt +++ b/compiler/testData/loadJava/compiledJava/MethodWithTypePP.fir.txt @@ -1,5 +1,5 @@ public final class MethodWithTypePP : R|kotlin/Any| { - public final fun

!|, Q : R|ft<@FlexibleNullability P, P?>!|> f(): R|kotlin/Unit| + public final fun

!|, Q : R|ft!|> f(): R|kotlin/Unit| public constructor(): R|test/MethodWithTypePP| diff --git a/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.fir.txt b/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.fir.txt index 88ab7b83570..2472e98c2d2 100644 --- a/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.fir.txt +++ b/compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.fir.txt @@ -1,5 +1,5 @@ public open class MethodWithTypePRefClassP

!|> : R|kotlin/Any| { - public final fun !|> f(): R|kotlin/Unit| + public final fun !|> f(): R|kotlin/Unit| public constructor

!|>(): R|test/MethodWithTypePRefClassP

| diff --git a/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.fir.txt b/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.fir.txt index 08fae4a412c..2ccb6cc4d3b 100644 --- a/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.fir.txt +++ b/compiler/testData/loadJava/compiledJava/MethosWithPRefTP.fir.txt @@ -1,5 +1,5 @@ public final class MethosWithPRefTP : R|kotlin/Any| { - public final fun

!|> f(p: R|ft<@FlexibleNullability P, P?>!|): R|kotlin/Unit| + public final fun

!|> f(p: R|ft!|): R|kotlin/Unit| public constructor(): R|test/MethosWithPRefTP| diff --git a/compiler/testData/loadJava/compiledJava/MyException.fir.txt b/compiler/testData/loadJava/compiledJava/MyException.fir.txt index 55a5f954c56..d0b5ce80202 100644 --- a/compiler/testData/loadJava/compiledJava/MyException.fir.txt +++ b/compiler/testData/loadJava/compiledJava/MyException.fir.txt @@ -1,4 +1,4 @@ public open class MyException : R|kotlin/Any| { - public constructor(message: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, cause: R|ft<@FlexibleNullability kotlin/Throwable, kotlin/Throwable?>!|): R|test/MyException| + public constructor(message: R|ft!|, cause: R|ft!|): R|test/MyException| } diff --git a/compiler/testData/loadJava/compiledJava/PackageLocalVisibility.fir.txt b/compiler/testData/loadJava/compiledJava/PackageLocalVisibility.fir.txt index ca7ba99a04a..54e2eb9adfe 100644 --- a/compiler/testData/loadJava/compiledJava/PackageLocalVisibility.fir.txt +++ b/compiler/testData/loadJava/compiledJava/PackageLocalVisibility.fir.txt @@ -1,11 +1,11 @@ public open class Frame : R|kotlin/Any| { - public/*package*/ open field accessibleContext: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public/*package*/ open field accessibleContext: R|ft!| public constructor(): R|awt/Frame| } public open class JFrame : R|awt/Frame| { - protected/*protected and package*/ open field accessibleContext: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + protected/*protected and package*/ open field accessibleContext: R|ft!| public constructor(): R|test/JFrame| diff --git a/compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.fir.txt b/compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.fir.txt index 3c864540e8a..286e71ec700 100644 --- a/compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.fir.txt +++ b/compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.fir.txt @@ -1,6 +1,6 @@ public abstract interface RemoveRedundantProjectionKind : R|kotlin/Any| { - public abstract fun f(collection: R|ft<@FlexibleNullability kotlin/collections/MutableCollection!>, kotlin/collections/Collection!>?>!|): R|kotlin/Unit| + public abstract fun f(collection: R|ft!>, kotlin/collections/Collection!>?>!|): R|kotlin/Unit| - public abstract fun f(comparator: R|ft<@FlexibleNullability kotlin/Comparable!>, kotlin/Comparable!>?>!|): R|kotlin/Unit| + public abstract fun f(comparator: R|ft!>, kotlin/Comparable!>?>!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/TopLevel$Class.fir.txt b/compiler/testData/loadJava/compiledJava/TopLevel$Class.fir.txt index bb807cf56b3..a0bbe00d88e 100644 --- a/compiler/testData/loadJava/compiledJava/TopLevel$Class.fir.txt +++ b/compiler/testData/loadJava/compiledJava/TopLevel$Class.fir.txt @@ -1,5 +1,5 @@ public open class TopLevel$Class : R|kotlin/Any| { - public open fun foo(other: R|ft<@FlexibleNullability test/TopLevel$Class, test/TopLevel$Class?>!|): R|kotlin/Unit| + public open fun foo(other: R|ft!|): R|kotlin/Unit| public constructor(): R|test/TopLevel$Class| diff --git a/compiler/testData/loadJava/compiledJava/UnboundWildcard.fir.txt b/compiler/testData/loadJava/compiledJava/UnboundWildcard.fir.txt index c73f1d7f8aa..2007a47d6de 100644 --- a/compiler/testData/loadJava/compiledJava/UnboundWildcard.fir.txt +++ b/compiler/testData/loadJava/compiledJava/UnboundWildcard.fir.txt @@ -1,7 +1,7 @@ public final class UnboundWildcard : R|kotlin/Any| { - public final fun foo(): R|ft<@FlexibleNullability test/UnboundWildcard.MyClass<*>, test/UnboundWildcard.MyClass<*>?>!| + public final fun foo(): R|ft, test/UnboundWildcard.MyClass<*>?>!| - public final fun collection(): R|ft<@FlexibleNullability kotlin/collections/MutableCollection<*>, kotlin/collections/Collection<*>?>!| + public final fun collection(): R|ft, kotlin/collections/Collection<*>?>!| public constructor(): R|test/UnboundWildcard| diff --git a/compiler/testData/loadJava/compiledJava/WildcardBounds.fir.txt b/compiler/testData/loadJava/compiledJava/WildcardBounds.fir.txt index f82c9171814..2dd00af5101 100644 --- a/compiler/testData/loadJava/compiledJava/WildcardBounds.fir.txt +++ b/compiler/testData/loadJava/compiledJava/WildcardBounds.fir.txt @@ -1,5 +1,5 @@ public open class WildcardBounds : R|kotlin/Any| { - public/*package*/ open fun foo(x: R|ft<@FlexibleNullability test/WildcardBounds.A!>, test/WildcardBounds.A!>?>!|, y: R|ft<@FlexibleNullability test/WildcardBounds.A!>, test/WildcardBounds.A!>?>!|): R|kotlin/Unit| + public/*package*/ open fun foo(x: R|ft!>, test/WildcardBounds.A!>?>!|, y: R|ft!>, test/WildcardBounds.A!>?>!|): R|kotlin/Unit| public constructor(): R|test/WildcardBounds| diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.fir.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.fir.txt index cbd13f04d73..8030d3aff68 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.fir.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.fir.txt @@ -1,7 +1,7 @@ -public final enum class AnnotatedEnumEntry : R|kotlin/Enum!>| { - @R|test/AnnotatedEnumEntry.Anno|(String(a)) public final static enum entry E1: R|@FlexibleNullability test/AnnotatedEnumEntry| - @R|test/AnnotatedEnumEntry.Anno|(String(b)) @R|test/AnnotatedEnumEntry.Anno2|() public final static enum entry E2: R|@FlexibleNullability test/AnnotatedEnumEntry| - public final static enum entry E3: R|@FlexibleNullability test/AnnotatedEnumEntry| +public final enum class AnnotatedEnumEntry : R|kotlin/Enum!>| { + @R|test/AnnotatedEnumEntry.Anno|(String(a)) public final static enum entry E1: R|@EnhancedNullability test/AnnotatedEnumEntry| + @R|test/AnnotatedEnumEntry.Anno|(String(b)) @R|test/AnnotatedEnumEntry.Anno2|() public final static enum entry E2: R|@EnhancedNullability test/AnnotatedEnumEntry| + public final static enum entry E3: R|@EnhancedNullability test/AnnotatedEnumEntry| public final static fun values(): R|kotlin/Array| { } diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedTypeInFun.fir.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedTypeInFun.fir.txt index 49927052b8f..7302d1a8925 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedTypeInFun.fir.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedTypeInFun.fir.txt @@ -1,5 +1,5 @@ public/*package*/ open class AnnotatedTypeInFun : R|kotlin/Any| { - public/*package*/ open fun foo(@R|test/AnnotatedTypeInFun.Anno|(String(a)) a: @R|test/AnnotatedTypeInFun.Anno|(String(a)) R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, @R|test/AnnotatedTypeInFun.Anno|(String(b)) b: @R|test/AnnotatedTypeInFun.Anno|(String(b)) R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit| + public/*package*/ open fun foo(@R|test/AnnotatedTypeInFun.Anno|(String(a)) a: @R|test/AnnotatedTypeInFun.Anno|(String(a)) R|ft!|, @R|test/AnnotatedTypeInFun.Anno|(String(b)) b: @R|test/AnnotatedTypeInFun.Anno|(String(b)) R|ft!|): R|kotlin/Unit| public/*package*/ constructor(): R|test/AnnotatedTypeInFun| diff --git a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.fir.txt b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.fir.txt index d9c5c9d06a0..a5daeeac779 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.fir.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.fir.txt @@ -1,5 +1,5 @@ public open class AnnotatedValueParameter : R|kotlin/Any| { - public open fun f(@R|test/AnnotatedValueParameter.Anno|(String(non-empty)) parameter: R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|): R|kotlin/Unit| + public open fun f(@R|test/AnnotatedValueParameter.Anno|(String(non-empty)) parameter: R|ft!>, kotlin/collections/List!>?>!|): R|kotlin/Unit| public constructor(): R|test/AnnotatedValueParameter| diff --git a/compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.fir.txt b/compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.fir.txt index 3d0ea98b0a4..16dc0a79045 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.fir.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.fir.txt @@ -1,6 +1,6 @@ -public final enum class EnumConstructorParameter : R|kotlin/Enum!>| { - public final static enum entry INSTANCE: R|@FlexibleNullability test/EnumConstructorParameter| - private constructor(@R|test/EnumConstructorParameter.Anno|(String(string)) s: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|test/EnumConstructorParameter| +public final enum class EnumConstructorParameter : R|kotlin/Enum!>| { + public final static enum entry INSTANCE: R|@EnhancedNullability test/EnumConstructorParameter| + private constructor(@R|test/EnumConstructorParameter.Anno|(String(string)) s: R|ft!|): R|test/EnumConstructorParameter| private constructor(x: R|kotlin/Int|): R|test/EnumConstructorParameter| diff --git a/compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.fir.txt b/compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.fir.txt index 06e0c7eca84..9d77acf371f 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.fir.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.fir.txt @@ -1,5 +1,5 @@ public open class JavaDocDeprecated : R|kotlin/Any| { - public open fun getFoo(text: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun getFoo(text: R|ft!|): R|ft!| public constructor(): R|test/JavaDocDeprecated| diff --git a/compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.fir.txt b/compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.fir.txt index c7690d6416c..582e76ca52c 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.fir.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.fir.txt @@ -1,4 +1,4 @@ public abstract interface StringConstantInParam : R|kotlin/Any| { - public final static field HEL: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(hel) + public final static field HEL: R|ft!| = String(hel) } diff --git a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.fir.txt b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.fir.txt index b4f95dbad8e..acc451ca9f7 100644 --- a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.fir.txt +++ b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.fir.txt @@ -1,4 +1,4 @@ public open class ConstructorGenericDeep : R|kotlin/Any| { - public constructor

!|>(cl: R|ft<@FlexibleNullability java/lang/Class!>, java/lang/Class!>?>!|): R|test/ConstructorGenericDeep| + public constructor

!|>(cl: R|ft!>, java/lang/Class!>?>!|): R|test/ConstructorGenericDeep| } diff --git a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.fir.txt b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.fir.txt index 3d647b85564..1062303dde0 100644 --- a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.fir.txt +++ b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.fir.txt @@ -1,4 +1,4 @@ public open class ConstructorGenericSimple : R|kotlin/Any| { - public constructor

!|>(p: R|ft<@FlexibleNullability P, P?>!|): R|test/ConstructorGenericSimple| + public constructor

!|>(p: R|ft!|): R|test/ConstructorGenericSimple| } diff --git a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.fir.txt b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.fir.txt index 334c34e4dde..c1a21961491 100644 --- a/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.fir.txt +++ b/compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.fir.txt @@ -1,4 +1,4 @@ public open class ConstructorGenericUpperBound : R|kotlin/Any| { - public constructor

!|>(p: R|ft<@FlexibleNullability P, P?>!|): R|test/ConstructorGenericUpperBound| + public constructor

!|>(p: R|ft!|): R|test/ConstructorGenericUpperBound| } diff --git a/compiler/testData/loadJava/compiledJava/enum/EnumMembers.fir.txt b/compiler/testData/loadJava/compiledJava/enum/EnumMembers.fir.txt index dbb44753cb9..9836c7d78cd 100644 --- a/compiler/testData/loadJava/compiledJava/enum/EnumMembers.fir.txt +++ b/compiler/testData/loadJava/compiledJava/enum/EnumMembers.fir.txt @@ -1,6 +1,6 @@ -public final enum class EnumMembers : R|kotlin/Enum!>| { - public final static enum entry FIRST: R|@FlexibleNullability test/EnumMembers| - public final static enum entry SECOND: R|@FlexibleNullability test/EnumMembers| +public final enum class EnumMembers : R|kotlin/Enum!>| { + public final static enum entry FIRST: R|@EnhancedNullability test/EnumMembers| + public final static enum entry SECOND: R|@EnhancedNullability test/EnumMembers| public final field isFirst: R|kotlin/Boolean| public open fun first(): R|kotlin/Boolean| diff --git a/compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.fir.txt b/compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.fir.txt index 50251c11ddc..fe66e3d77e0 100644 --- a/compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.fir.txt +++ b/compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.fir.txt @@ -1,6 +1,6 @@ -public open enum class EnumWithSpecializedEntry : R|kotlin/Enum!>| { - public final static enum entry E1: R|@FlexibleNullability test/EnumWithSpecializedEntry| - public final static enum entry E2: R|@FlexibleNullability test/EnumWithSpecializedEntry| +public open enum class EnumWithSpecializedEntry : R|kotlin/Enum!>| { + public final static enum entry E1: R|@EnhancedNullability test/EnumWithSpecializedEntry| + public final static enum entry E2: R|@EnhancedNullability test/EnumWithSpecializedEntry| public final static fun values(): R|kotlin/Array| { } diff --git a/compiler/testData/loadJava/compiledJava/enum/JavaEnum.fir.txt b/compiler/testData/loadJava/compiledJava/enum/JavaEnum.fir.txt index 9b44b018a6e..16b54143c47 100644 --- a/compiler/testData/loadJava/compiledJava/enum/JavaEnum.fir.txt +++ b/compiler/testData/loadJava/compiledJava/enum/JavaEnum.fir.txt @@ -1,6 +1,6 @@ -public final enum class JavaEnum : R|kotlin/Enum!>| { - public final static enum entry ENTRY: R|@FlexibleNullability test/JavaEnum| - public final static enum entry ANOTHER: R|@FlexibleNullability test/JavaEnum| +public final enum class JavaEnum : R|kotlin/Enum!>| { + public final static enum entry ENTRY: R|@EnhancedNullability test/JavaEnum| + public final static enum entry ANOTHER: R|@EnhancedNullability test/JavaEnum| public final static fun values(): R|kotlin/Array| { } diff --git a/compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.fir.txt b/compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.fir.txt index 37d05490aba..c8e0cf1a9db 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.fir.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.fir.txt @@ -1,5 +1,5 @@ public open class DifferentGetterAndSetter : R|kotlin/Any| { - public open fun setSomething(color: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit| + public open fun setSomething(color: R|ft!|): R|kotlin/Unit| public open fun getSomething(): R|kotlin/Int| diff --git a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.fir.txt b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.fir.txt index e24c3bfb30b..699f7f70a7e 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.fir.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.fir.txt @@ -1,5 +1,5 @@ public open class JavaBeanVal : R|kotlin/Any| { - public open fun getColor(): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun getColor(): R|ft!| public constructor(): R|test/JavaBeanVal| diff --git a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.fir.txt b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.fir.txt index de3686dff4d..5ccda953b37 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.fir.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.fir.txt @@ -1,7 +1,7 @@ public open class JavaBeanVar : R|kotlin/Any| { - public open fun getColor(): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun getColor(): R|ft!| - public open fun setColor(string: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit| + public open fun setColor(string: R|ft!|): R|kotlin/Unit| public constructor(): R|test/JavaBeanVar| diff --git a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.fir.txt b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.fir.txt index 7306dca2f4e..09ed70585c6 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.fir.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.fir.txt @@ -1,7 +1,7 @@ public open class JavaBeanVarOfGenericType

!|> : R|kotlin/Any| { - public open fun getCharacters(): R|ft<@FlexibleNullability java/util/ArrayList!>, java/util/ArrayList!>?>!| + public open fun getCharacters(): R|ft!>, java/util/ArrayList!>?>!| - public open fun setCharacters(characters: R|ft<@FlexibleNullability java/util/ArrayList!>, java/util/ArrayList!>?>!|): R|kotlin/Unit| + public open fun setCharacters(characters: R|ft!>, java/util/ArrayList!>?>!|): R|kotlin/Unit| public constructor

!|>(): R|test/JavaBeanVarOfGenericType

| diff --git a/compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.fir.txt b/compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.fir.txt index 2487502afe3..63b1f2b7d4d 100644 --- a/compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.fir.txt +++ b/compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.fir.txt @@ -1,5 +1,5 @@ public open class TwoSetters : R|kotlin/Any| { - public open fun setSize(size: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Unit| + public open fun setSize(size: R|ft!|): R|kotlin/Unit| public open fun setSize(size: R|kotlin/Int|): R|kotlin/Unit| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.fir.txt index 1d0d376fb11..631151624b6 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.fir.txt @@ -1,5 +1,5 @@ public open class AllBoundsInWhen : R|kotlin/Any| { - public open fun !|> foo(): R|kotlin/Unit| + public open fun !|> foo(): R|kotlin/Unit| public constructor(): R|test/AllBoundsInWhen| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.fir.txt index 776ed49affc..11722833a1f 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.fir.txt @@ -1,5 +1,5 @@ public open class ArrayType : R|kotlin/Any| { - public open fun foo(): R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!| + public open fun foo(): R|ft!>, kotlin/Array!>?>!| public constructor(): R|test/ArrayType| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.fir.txt index 8363f8f871b..0ef2f13d500 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.fir.txt @@ -1,4 +1,4 @@ public open class ConstructorWithNewTypeParams!|> : R|kotlin/Any| { - public constructor!|, U : R|ft!|>(first: R|ft<@FlexibleNullability U, U?>!|): R|test/ConstructorWithNewTypeParams| + public constructor!|, U : R|ft!|>(first: R|ft!|): R|test/ConstructorWithNewTypeParams| } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.fir.txt index 7cb69ff11b8..d06169dbbb9 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.fir.txt @@ -1,4 +1,4 @@ public open class ConstructorWithParentTypeParams!|> : R|kotlin/Any| { - public constructor!|>(first: R|ft<@FlexibleNullability T, T?>!|): R|test/ConstructorWithParentTypeParams| + public constructor!|>(first: R|ft!|): R|test/ConstructorWithParentTypeParams| } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.fir.txt index ad470292904..db7f7621e44 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.fir.txt @@ -1,4 +1,4 @@ public open class ConstructorWithSeveralParams : R|kotlin/Any| { - public constructor(integer: R|ft<@FlexibleNullability kotlin/Int, kotlin/Int?>!|, intBasic: R|kotlin/Int|, collection: R|ft<@FlexibleNullability java/util/ArrayList!>, java/util/ArrayList!>?>!|): R|test/ConstructorWithSeveralParams| + public constructor(integer: R|ft!|, intBasic: R|kotlin/Int|, collection: R|ft!>, java/util/ArrayList!>?>!|): R|test/ConstructorWithSeveralParams| } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.fir.txt index dfa76faaf36..0111e55d7a1 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.fir.txt @@ -1,5 +1,5 @@ public open class CustomProjectionKind : R|kotlin/Any| { - public open fun foo(): R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!| + public open fun foo(): R|ft!>, kotlin/collections/List!>?>!| public constructor(): R|test/CustomProjectionKind| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.fir.txt index c670a85da59..847b28570af 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.fir.txt @@ -1,5 +1,5 @@ public open class MethodWithFunctionTypes : R|kotlin/Any| { - public open fun foo(f: R|ft<@FlexibleNullability kotlin/Function1!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, kotlin/Function1!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>?>!|): R|ft<@FlexibleNullability kotlin/Function0!>, kotlin/Function0!>?>!| + public open fun foo(f: R|ft!, ft!>, kotlin/Function1!, ft!>?>!|): R|ft!>, kotlin/Function0!>?>!| public constructor(): R|test/MethodWithFunctionTypes| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.fir.txt index 372baf50a9e..7aec26e74cd 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.fir.txt @@ -1,5 +1,5 @@ public open class MethodWithGenerics : R|kotlin/Any| { - public open fun foo(a: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, b: R|ft<@FlexibleNullability kotlin/collections/MutableList!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, kotlin/collections/Map.Entry!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>?>!>, kotlin/collections/List!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, kotlin/collections/Map.Entry!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>?>!>?>!|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun foo(a: R|ft!|, b: R|ft!, ft!>, kotlin/collections/Map.Entry!, ft!>?>!>, kotlin/collections/List!, ft!>, kotlin/collections/Map.Entry!, ft!>?>!>?>!|): R|ft!| public constructor(): R|test/MethodWithGenerics| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.fir.txt index 344a4c38b2a..cd191791590 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.fir.txt @@ -1,7 +1,7 @@ public open class MethodWithMappedClasses : R|kotlin/Any| { - public open fun !|> copy(dest: R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List<*>?>!|, src: R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|): R|kotlin/Unit| + public open fun !|> copy(dest: R|ft!>, kotlin/collections/List<*>?>!|, src: R|ft!>, kotlin/collections/List!>?>!|): R|kotlin/Unit| - public open fun !|> copyMap(dest: R|ft<@FlexibleNullability kotlin/collections/MutableMap!, in ft<@FlexibleNullability T, T?>!>, kotlin/collections/Map!, *>?>!|, src: R|ft<@FlexibleNullability kotlin/collections/MutableMap!, ft<@FlexibleNullability T, T?>!>, kotlin/collections/Map!, ft<@FlexibleNullability T, T?>!>?>!|): R|kotlin/Unit| + public open fun !|> copyMap(dest: R|ft!, in ft!>, kotlin/collections/Map!, *>?>!|, src: R|ft!, ft!>, kotlin/collections/Map!, ft!>?>!|): R|kotlin/Unit| public constructor(): R|test/MethodWithMappedClasses| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.fir.txt index aae0d6d367d..bd4975c1c2f 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.fir.txt @@ -1,5 +1,5 @@ public open class MethodWithTypeParameters : R|kotlin/Any| { - public open fun !|, B : R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|, R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|> foo(a: R|ft<@FlexibleNullability A, A?>!|, b: R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|, list: R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List<*>?>!|): R|kotlin/Unit| + public open fun !|, B : R|ft!|, R|ft!>, kotlin/collections/List!>?>!|> foo(a: R|ft!|, b: R|ft!>, kotlin/collections/List!>?>!|, list: R|ft!>, kotlin/collections/List<*>?>!|): R|kotlin/Unit| public constructor(): R|test/MethodWithTypeParameters| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.fir.txt index 5b0a470aa2f..65663efc015 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.fir.txt @@ -1,5 +1,5 @@ public open class MethodWithVararg : R|kotlin/Any| { - public open fun foo(vararg s: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!|): R|kotlin/Unit| + public open fun foo(vararg s: R|ft!>, kotlin/Array!>?>!|): R|kotlin/Unit| public constructor(): R|test/MethodWithVararg| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.fir.txt index 538e98336d3..ef8d624fe81 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.fir.txt @@ -1,9 +1,9 @@ public open class PropertyArrayTypes!|> : R|kotlin/Any| { - public open field arrayOfArrays: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!>, kotlin/Array!>, kotlin/Array!>?>!>?>!| + public open field arrayOfArrays: R|ft!>, kotlin/Array!>?>!>, kotlin/Array!>, kotlin/Array!>?>!>?>!| - public open field array: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!| + public open field array: R|ft!>, kotlin/Array!>?>!| - public open field genericArray: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!| + public open field genericArray: R|ft!>, kotlin/Array!>?>!| public constructor!|>(): R|test/PropertyArrayTypes| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.fir.txt index 3cf4f358bba..2ed4dd1f94a 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.fir.txt @@ -1,11 +1,11 @@ public open class PropertyComplexTypes!|> : R|kotlin/Any| { - public open field genericType: R|ft<@FlexibleNullability T, T?>!| + public open field genericType: R|ft!| - public open field listDefinedGeneric: R|ft<@FlexibleNullability java/util/ArrayList!>, java/util/ArrayList!>?>!| + public open field listDefinedGeneric: R|ft!>, java/util/ArrayList!>?>!| - public open field listGeneric: R|ft<@FlexibleNullability java/util/ArrayList!>, java/util/ArrayList!>?>!| + public open field listGeneric: R|ft!>, java/util/ArrayList!>?>!| - public open field listOfGenericList: R|ft<@FlexibleNullability java/util/ArrayList!>, java/util/ArrayList!>?>!>, java/util/ArrayList!>, java/util/ArrayList!>?>!>?>!| + public open field listOfGenericList: R|ft!>, java/util/ArrayList!>?>!>, java/util/ArrayList!>, java/util/ArrayList!>?>!>?>!| public constructor!|>(): R|test/PropertyComplexTypes| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.fir.txt index 428cb780aa1..db53eb1586a 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.fir.txt @@ -1,7 +1,7 @@ public open class PropertySimpleType : R|kotlin/Any| { - public open field fieldOne: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open field fieldOne: R|ft!| - public open field fieldTwo: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open field fieldTwo: R|ft!| public constructor(): R|test/PropertySimpleType| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.fir.txt index 909ae4bc3aa..efb97842d04 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.fir.txt @@ -1,5 +1,5 @@ public final class StarProjection : R|kotlin/Any| { - public final fun foo(): R|ft<@FlexibleNullability test/StarProjection.MyClass<*>, test/StarProjection.MyClass<*>?>!| + public final fun foo(): R|ft, test/StarProjection.MyClass<*>?>!| public constructor(): R|test/StarProjection| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.fir.txt index cd2e0b52d54..66c8a8f42fc 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.fir.txt @@ -1,5 +1,5 @@ public open class WrongProjectionKind : R|kotlin/Any| { - public open fun copy(from: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!|, to: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!|): R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!| + public open fun copy(from: R|ft!>, kotlin/Array!>?>!|, to: R|ft!>, kotlin/Array!>?>!|): R|ft!>, kotlin/collections/List!>?>!| public constructor(): R|test/WrongProjectionKind| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.fir.txt index 36f6d603bec..f1ffdab8340 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.fir.txt @@ -1,5 +1,5 @@ public open class WrongReturnTypeStructure : R|kotlin/Any| { - public open fun foo(a: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, b: R|ft<@FlexibleNullability kotlin/collections/MutableList!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, kotlin/collections/Map.Entry!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>?>!>, kotlin/collections/List!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, kotlin/collections/Map.Entry!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>?>!>?>!|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun foo(a: R|ft!|, b: R|ft!, ft!>, kotlin/collections/Map.Entry!, ft!>?>!>, kotlin/collections/List!, ft!>, kotlin/collections/Map.Entry!, ft!>?>!>?>!|): R|ft!| public constructor(): R|test/WrongReturnTypeStructure| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.fir.txt index 4b50d0d6d4e..2f8e39f04a3 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.fir.txt @@ -1,5 +1,5 @@ public open class WrongTypeParameterBoundStructure1 : R|kotlin/Any| { - public open fun !|, B : R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|, R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|> foo(a: R|ft<@FlexibleNullability A, A?>!|, b: R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|): R|kotlin/Unit| + public open fun !|, B : R|ft!|, R|ft!>, kotlin/collections/List!>?>!|> foo(a: R|ft!|, b: R|ft!>, kotlin/collections/List!>?>!|): R|kotlin/Unit| public constructor(): R|test/WrongTypeParameterBoundStructure1| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.fir.txt index 3d2386e4733..528219f1f73 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.fir.txt @@ -1,5 +1,5 @@ public open class WrongValueParameterStructure1 : R|kotlin/Any| { - public open fun foo(a: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, b: R|ft<@FlexibleNullability kotlin/collections/MutableList!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, kotlin/collections/Map.Entry!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>?>!>, kotlin/collections/List!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>, kotlin/collections/Map.Entry!, ft<@FlexibleNullability kotlin/String, kotlin/String?>!>?>!>?>!|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open fun foo(a: R|ft!|, b: R|ft!, ft!>, kotlin/collections/Map.Entry!, ft!>?>!>, kotlin/collections/List!, ft!>, kotlin/collections/Map.Entry!, ft!>?>!>?>!|): R|ft!| public constructor(): R|test/WrongValueParameterStructure1| diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.fir.txt index 1cc1f7c342a..a6c778e2aaf 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.fir.txt @@ -1,4 +1,4 @@ -public abstract interface SubclassOfCollection!|> : R|kotlin/collections/MutableCollection!>| { - public abstract operator fun iterator(): R|@FlexibleNullability kotlin/collections/MutableIterator!>| +public abstract interface SubclassOfCollection!|> : R|kotlin/collections/MutableCollection!>| { + public abstract operator fun iterator(): R|@EnhancedNullability kotlin/collections/MutableIterator!>| } diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.fir.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.fir.txt index 84070000ea8..68511488c6f 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.fir.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.fir.txt @@ -1,4 +1,4 @@ -public abstract interface SubclassOfMapEntry!|, V : R|ft!|> : R|kotlin/collections/MutableMap.MutableEntry!, ft<@FlexibleNullability V, V?>!>| { - public abstract operator fun setValue(value: R|ft<@FlexibleNullability V, V?>!|): R|ft<@FlexibleNullability V, V?>!| +public abstract interface SubclassOfMapEntry!|, V : R|ft!|> : R|kotlin/collections/MutableMap.MutableEntry!, ft!>| { + public abstract operator fun setValue(value: R|ft!|): R|ft!| } diff --git a/compiler/testData/loadJava/compiledJava/library/LoadIterable.fir.txt b/compiler/testData/loadJava/compiledJava/library/LoadIterable.fir.txt index edb7e2c503b..9ddc69fb0f1 100644 --- a/compiler/testData/loadJava/compiledJava/library/LoadIterable.fir.txt +++ b/compiler/testData/loadJava/compiledJava/library/LoadIterable.fir.txt @@ -1,6 +1,6 @@ public abstract interface LoadIterable!|> : R|kotlin/Any| { - public abstract fun getIterable(): R|ft<@FlexibleNullability kotlin/collections/MutableIterable!>, kotlin/collections/Iterable!>?>!| + public abstract fun getIterable(): R|ft!>, kotlin/collections/Iterable!>?>!| - public abstract fun setIterable(Iterable: R|ft<@FlexibleNullability kotlin/collections/MutableIterable!>, kotlin/collections/Iterable!>?>!|): R|kotlin/Unit| + public abstract fun setIterable(Iterable: R|ft!>, kotlin/collections/Iterable!>?>!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/library/LoadIterator.fir.txt b/compiler/testData/loadJava/compiledJava/library/LoadIterator.fir.txt index 497c2884204..ecfdd58c5f9 100644 --- a/compiler/testData/loadJava/compiledJava/library/LoadIterator.fir.txt +++ b/compiler/testData/loadJava/compiledJava/library/LoadIterator.fir.txt @@ -1,6 +1,6 @@ public abstract interface LoadIterator!|> : R|kotlin/Any| { - public abstract fun getIterator(): R|ft<@FlexibleNullability kotlin/collections/MutableIterator!>, kotlin/collections/Iterator!>?>!| + public abstract fun getIterator(): R|ft!>, kotlin/collections/Iterator!>?>!| - public abstract fun setIterator(iterator: R|ft<@FlexibleNullability kotlin/collections/MutableIterator!>, kotlin/collections/Iterator!>?>!|): R|kotlin/Unit| + public abstract fun setIterator(iterator: R|ft!>, kotlin/collections/Iterator!>?>!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/library/Max.fir.txt b/compiler/testData/loadJava/compiledJava/library/Max.fir.txt index 8dbd4195715..399c1d08a4f 100644 --- a/compiler/testData/loadJava/compiledJava/library/Max.fir.txt +++ b/compiler/testData/loadJava/compiledJava/library/Max.fir.txt @@ -1,5 +1,5 @@ public open class Max : R|kotlin/Any| { - public open fun !|, R|ft<@FlexibleNullability kotlin/Comparable!>, kotlin/Comparable!>?>!|> max(coll: R|ft<@FlexibleNullability kotlin/collections/MutableCollection!>, kotlin/collections/Collection!>?>!|): R|ft<@FlexibleNullability T, T?>!| + public open fun !|, R|ft!>, kotlin/Comparable!>?>!|> max(coll: R|ft!>, kotlin/collections/Collection!>?>!|): R|ft!| public constructor(): R|test/Max| diff --git a/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.fir.txt b/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.fir.txt index b5baee9257a..56bd0067080 100644 --- a/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.fir.txt +++ b/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.fir.txt @@ -1,4 +1,4 @@ -public open class ModalityOfFakeOverrides : R|java/util/AbstractList!>| { +public open class ModalityOfFakeOverrides : R|java/util/AbstractList!>| { @R|java/lang/Override|() @R|org/jetbrains/annotations/NotNull|() public open operator fun get(index: R|kotlin/Int|): R|@EnhancedNullability kotlin/String| public constructor(): R|test/ModalityOfFakeOverrides| diff --git a/compiler/testData/loadJava/compiledJava/mutability/LoadIterable.fir.txt b/compiler/testData/loadJava/compiledJava/mutability/LoadIterable.fir.txt index df58b9b0773..78a4930211e 100644 --- a/compiler/testData/loadJava/compiledJava/mutability/LoadIterable.fir.txt +++ b/compiler/testData/loadJava/compiledJava/mutability/LoadIterable.fir.txt @@ -1,10 +1,10 @@ public abstract interface LoadIterable!|> : R|kotlin/Any| { - @R|kotlin/annotations/jvm/Mutable|() public abstract fun getIterable(): R|ft<@FlexibleNullability kotlin/collections/MutableIterable!>, kotlin/collections/MutableIterable!>?>!| + @R|kotlin/annotations/jvm/Mutable|() public abstract fun getIterable(): R|ft!>, kotlin/collections/MutableIterable!>?>!| - public abstract fun setIterable(@R|kotlin/annotations/jvm/Mutable|() Iterable: R|ft<@FlexibleNullability kotlin/collections/MutableIterable!>, kotlin/collections/MutableIterable!>?>!|): R|kotlin/Unit| + public abstract fun setIterable(@R|kotlin/annotations/jvm/Mutable|() Iterable: R|ft!>, kotlin/collections/MutableIterable!>?>!|): R|kotlin/Unit| - @R|kotlin/annotations/jvm/ReadOnly|() public abstract fun getReadOnlyIterable(): R|ft<@FlexibleNullability kotlin/collections/Iterable!>, kotlin/collections/Iterable!>?>!| + @R|kotlin/annotations/jvm/ReadOnly|() public abstract fun getReadOnlyIterable(): R|ft!>, kotlin/collections/Iterable!>?>!| - public abstract fun setReadOnlyIterable(@R|kotlin/annotations/jvm/ReadOnly|() Iterable: R|ft<@FlexibleNullability kotlin/collections/Iterable!>, kotlin/collections/Iterable!>?>!|): R|kotlin/Unit| + public abstract fun setReadOnlyIterable(@R|kotlin/annotations/jvm/ReadOnly|() Iterable: R|ft!>, kotlin/collections/Iterable!>?>!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.fir.txt b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.fir.txt index 9c8e8239420..aff107cedea 100644 --- a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.fir.txt +++ b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.fir.txt @@ -1,6 +1,6 @@ public abstract interface LoadIterableWithConflict!|> : R|kotlin/Any| { - @R|kotlin/annotations/jvm/ReadOnly|() @R|kotlin/annotations/jvm/Mutable|() public abstract fun getIterable(): R|ft<@FlexibleNullability kotlin/collections/MutableIterable!>, kotlin/collections/Iterable!>?>!| + @R|kotlin/annotations/jvm/ReadOnly|() @R|kotlin/annotations/jvm/Mutable|() public abstract fun getIterable(): R|ft!>, kotlin/collections/Iterable!>?>!| - public abstract fun setIterable(@R|kotlin/annotations/jvm/ReadOnly|() @R|kotlin/annotations/jvm/Mutable|() Iterable: R|ft<@FlexibleNullability kotlin/collections/MutableIterable!>, kotlin/collections/Iterable!>?>!|): R|kotlin/Unit| + public abstract fun setIterable(@R|kotlin/annotations/jvm/ReadOnly|() @R|kotlin/annotations/jvm/Mutable|() Iterable: R|ft!>, kotlin/collections/Iterable!>?>!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.fir.txt b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.fir.txt index 7bf69dc0146..3be53e234f6 100644 --- a/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.fir.txt +++ b/compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.fir.txt @@ -1,10 +1,10 @@ public abstract interface LoadIterableWithNullability!|> : R|kotlin/Any| { - @R|org/jetbrains/annotations/NotNull|() @R|kotlin/annotations/jvm/Mutable|() public abstract fun getIterable(): R|@EnhancedNullability @R|kotlin/annotations/jvm/Mutable|() kotlin/collections/MutableIterable!>| + @R|org/jetbrains/annotations/NotNull|() @R|kotlin/annotations/jvm/Mutable|() public abstract fun getIterable(): R|@EnhancedNullability @R|kotlin/annotations/jvm/Mutable|() kotlin/collections/MutableIterable!>| - public abstract fun setIterable(@R|kotlin/annotations/jvm/Mutable|() @R|org/jetbrains/annotations/NotNull|() Iterable: R|@EnhancedNullability @R|kotlin/annotations/jvm/Mutable|() kotlin/collections/MutableIterable!>|): R|kotlin/Unit| + public abstract fun setIterable(@R|kotlin/annotations/jvm/Mutable|() @R|org/jetbrains/annotations/NotNull|() Iterable: R|@EnhancedNullability @R|kotlin/annotations/jvm/Mutable|() kotlin/collections/MutableIterable!>|): R|kotlin/Unit| - @R|org/jetbrains/annotations/NotNull|() @R|kotlin/annotations/jvm/ReadOnly|() public abstract fun getReadOnlyIterable(): R|@EnhancedNullability @R|kotlin/annotations/jvm/ReadOnly|() kotlin/collections/Iterable!>| + @R|org/jetbrains/annotations/NotNull|() @R|kotlin/annotations/jvm/ReadOnly|() public abstract fun getReadOnlyIterable(): R|@EnhancedNullability @R|kotlin/annotations/jvm/ReadOnly|() kotlin/collections/Iterable!>| - public abstract fun setReadOnlyIterable(@R|kotlin/annotations/jvm/ReadOnly|() @R|org/jetbrains/annotations/NotNull|() Iterable: R|@EnhancedNullability @R|kotlin/annotations/jvm/ReadOnly|() kotlin/collections/Iterable!>|): R|kotlin/Unit| + public abstract fun setReadOnlyIterable(@R|kotlin/annotations/jvm/ReadOnly|() @R|org/jetbrains/annotations/NotNull|() Iterable: R|@EnhancedNullability @R|kotlin/annotations/jvm/ReadOnly|() kotlin/collections/Iterable!>|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.fir.txt b/compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.fir.txt index 3c700bc0a11..bb96f9b059e 100644 --- a/compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.fir.txt +++ b/compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.fir.txt @@ -1,6 +1,6 @@ public abstract interface ReadOnlyExtendsWildcard : R|kotlin/Any| { public abstract fun bar(): R|kotlin/Unit| - public abstract fun foo(@R|kotlin/annotations/jvm/ReadOnly|() x: R|ft<@FlexibleNullability kotlin/collections/List!>, kotlin/collections/List!>?>!|, @R|org/jetbrains/annotations/NotNull|() y: R|@EnhancedNullability kotlin/Comparable!>|): R|kotlin/Unit| + public abstract fun foo(@R|kotlin/annotations/jvm/ReadOnly|() x: R|ft!>, kotlin/collections/List!>?>!|, @R|org/jetbrains/annotations/NotNull|() y: R|@EnhancedNullability kotlin/Comparable!>|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.fir.txt b/compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.fir.txt index 4c0c4dfbf50..36f4528180e 100644 --- a/compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.fir.txt +++ b/compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.fir.txt @@ -1,5 +1,5 @@ public open class NotNullObjectArray : R|kotlin/Any| { - @R|org/jetbrains/annotations/NotNull|() public open fun hi(): R|ft<@EnhancedNullability kotlin/Array!>, @EnhancedNullability kotlin/Array!>>| + @R|org/jetbrains/annotations/NotNull|() public open fun hi(): R|ft<@EnhancedNullability kotlin/Array!>, @EnhancedNullability kotlin/Array!>>| public constructor(): R|test/NotNullObjectArray| diff --git a/compiler/testData/loadJava/compiledJava/sam/Comparator.fir.txt b/compiler/testData/loadJava/compiledJava/sam/Comparator.fir.txt index dc472d735a9..f80ce812a9b 100644 --- a/compiler/testData/loadJava/compiledJava/sam/Comparator.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/Comparator.fir.txt @@ -1,4 +1,4 @@ public abstract interface Comparator!|> : R|kotlin/Any| { - public abstract fun compare(o1: R|ft<@FlexibleNullability T, T?>!|, o2: R|ft<@FlexibleNullability T, T?>!|): R|kotlin/Int| + public abstract fun compare(o1: R|ft!|, o2: R|ft!|): R|kotlin/Int| } diff --git a/compiler/testData/loadJava/compiledJava/sam/FilenameFilter.fir.txt b/compiler/testData/loadJava/compiledJava/sam/FilenameFilter.fir.txt index a852ff7c26b..f5438fd128c 100644 --- a/compiler/testData/loadJava/compiledJava/sam/FilenameFilter.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/FilenameFilter.fir.txt @@ -1,4 +1,4 @@ public abstract interface FilenameFilter : R|kotlin/Any| { - public abstract fun accept(dir: R|ft<@FlexibleNullability java/io/File, java/io/File?>!|, name: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|): R|kotlin/Boolean| + public abstract fun accept(dir: R|ft!|, name: R|ft!|): R|kotlin/Boolean| } diff --git a/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.fir.txt b/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.fir.txt index 60a6e5e3dc0..16cbfb10b49 100644 --- a/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.fir.txt @@ -1,4 +1,4 @@ -public abstract interface GenericInterfaceParameterWithSelfBound!>, test/GenericInterfaceParameterWithSelfBound!>?>!|> : R|kotlin/Any| { - public abstract fun method(t: R|ft<@FlexibleNullability T, T?>!|): R|ft<@FlexibleNullability T, T?>!| +public abstract interface GenericInterfaceParameterWithSelfBound!>, test/GenericInterfaceParameterWithSelfBound!>?>!|> : R|kotlin/Any| { + public abstract fun method(t: R|ft!|): R|ft!| } diff --git a/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.fir.txt b/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.fir.txt index 38ece403cef..4671d98a5e1 100644 --- a/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.fir.txt @@ -1,4 +1,4 @@ -public abstract interface GenericInterfaceParametersWithBounds!>, kotlin/Comparable!>?>!|, R|ft<@FlexibleNullability kotlin/Cloneable, kotlin/Cloneable?>!|, B : R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|> : R|kotlin/Any| { - public abstract fun method(a: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!|, b: R|ft<@FlexibleNullability B, B?>!|): R|kotlin/Unit| +public abstract interface GenericInterfaceParametersWithBounds!>, kotlin/Comparable!>?>!|, R|ft!|, B : R|ft!>, kotlin/collections/List!>?>!|> : R|kotlin/Any| { + public abstract fun method(a: R|ft!>, kotlin/Array!>?>!|, b: R|ft!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.fir.txt b/compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.fir.txt index 3094e8aaf70..118e9a19adb 100644 --- a/compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.fir.txt @@ -1,4 +1,4 @@ public abstract interface GenericMethodParameters : R|kotlin/Any| { - public abstract fun !|, B : R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|> method(a: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!|, b: R|ft<@FlexibleNullability B, B?>!|): R|kotlin/Unit| + public abstract fun !|, B : R|ft!>, kotlin/collections/List!>?>!|> method(a: R|ft!>, kotlin/Array!>?>!|, b: R|ft!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.fir.txt b/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.fir.txt index 0af72149fe1..9ad3856f86f 100644 --- a/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.fir.txt @@ -1,2 +1,2 @@ -public abstract interface SubstitutedSamInterface : R|java/util/Comparator!>| { +public abstract interface SubstitutedSamInterface : R|java/util/Comparator!>| { } diff --git a/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.fir.txt b/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.fir.txt index ce115f8ba45..8d760bb4261 100644 --- a/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.fir.txt @@ -1,2 +1,2 @@ -public abstract interface SubstitutedSamInterfaceSubclassOfBuiltin : R|kotlin/Comparable!>| { +public abstract interface SubstitutedSamInterfaceSubclassOfBuiltin : R|kotlin/Comparable!>| { } diff --git a/compiler/testData/loadJava/compiledJava/sam/VarargParameter.fir.txt b/compiler/testData/loadJava/compiledJava/sam/VarargParameter.fir.txt index 7e40c4ddebe..798d49e7413 100644 --- a/compiler/testData/loadJava/compiledJava/sam/VarargParameter.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/VarargParameter.fir.txt @@ -1,4 +1,4 @@ public abstract interface VarargParameter : R|kotlin/Any| { - public abstract fun f(vararg strings: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!|): R|kotlin/Unit| + public abstract fun f(vararg strings: R|ft!>, kotlin/Array!>?>!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.fir.txt index 789dc5d13d1..4abcef59143 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.fir.txt @@ -1,7 +1,7 @@ public open class AmbiguousAdapters : R|kotlin/Any| { - public open fun foo(r: R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|): R|kotlin/Unit| + public open fun foo(r: R|ft!|): R|kotlin/Unit| - public open fun foo(c: R|ft<@FlexibleNullability java/io/Closeable, java/io/Closeable?>!|): R|kotlin/Unit| + public open fun foo(c: R|ft!|): R|kotlin/Unit| public constructor(): R|test/AmbiguousAdapters| diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/Basic.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/Basic.fir.txt index 36eca5e9e2b..853920ef860 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/Basic.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/Basic.fir.txt @@ -1,7 +1,7 @@ public open class Basic : R|kotlin/Any| { - public open fun foo(r: R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|): R|kotlin/Unit| + public open fun foo(r: R|ft!|): R|kotlin/Unit| - public open static fun bar(r: R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|): R|kotlin/Unit| + public open static fun bar(r: R|ft!|): R|kotlin/Unit| public constructor(): R|test/Basic| diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.fir.txt index 53c365cc0a3..0f0c72f6b81 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.fir.txt @@ -1,4 +1,4 @@ public open class Constructor : R|kotlin/Any| { - public constructor(r: R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|): R|test/Constructor| + public constructor(r: R|ft!|): R|test/Constructor| } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.fir.txt index bc08bb138c9..04537918725 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.fir.txt @@ -1,4 +1,4 @@ public open class ConstructorWithAnnotations : R|kotlin/Any| { - public constructor(r: R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|, @R|org/jetbrains/annotations/NotNull|() s: R|@EnhancedNullability kotlin/String|): R|test/ConstructorWithAnnotations| + public constructor(r: R|ft!|, @R|org/jetbrains/annotations/NotNull|() s: R|@EnhancedNullability kotlin/String|): R|test/ConstructorWithAnnotations| } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.fir.txt index 4330efa689b..7fc2e592f23 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.fir.txt @@ -1,11 +1,11 @@ public open class NonTrivialFunctionType : R|kotlin/Any| { - public open fun foo(filenameFilter: R|ft<@FlexibleNullability java/io/FilenameFilter, java/io/FilenameFilter?>!|): R|kotlin/Unit| + public open fun foo(filenameFilter: R|ft!|): R|kotlin/Unit| - public open fun foo(comparator: R|ft<@FlexibleNullability java/util/Comparator!>, java/util/Comparator!>?>!|): R|kotlin/Unit| + public open fun foo(comparator: R|ft!>, java/util/Comparator!>?>!|): R|kotlin/Unit| - public open fun wildcardUnbound(comparator: R|ft<@FlexibleNullability java/util/Comparator<*>, java/util/Comparator<*>?>!|): R|kotlin/Unit| + public open fun wildcardUnbound(comparator: R|ft, java/util/Comparator<*>?>!|): R|kotlin/Unit| - public open fun wildcardBound(comparator: R|ft<@FlexibleNullability java/util/Comparator!>, java/util/Comparator!>?>!|): R|kotlin/Unit| + public open fun wildcardBound(comparator: R|ft!>, java/util/Comparator!>?>!|): R|kotlin/Unit| public constructor(): R|test/NonTrivialFunctionType| diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.fir.txt index 8a6822ad29d..3cbb73d130e 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.fir.txt @@ -1,5 +1,5 @@ public open class PrivateSamAdapter : R|kotlin/Any| { - private open fun samAdapter(r: R|ft<@FlexibleNullability test/PrivateSamAdapter.SamInterface, test/PrivateSamAdapter.SamInterface?>!|): R|kotlin/Unit| + private open fun samAdapter(r: R|ft!|): R|kotlin/Unit| public constructor(): R|test/PrivateSamAdapter| diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.fir.txt index 797a91ff978..82a757164e4 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.fir.txt @@ -1,4 +1,4 @@ public abstract interface SelfAsParameter : R|kotlin/Any| { - public abstract fun foo(p: R|ft<@FlexibleNullability test/SelfAsParameter, test/SelfAsParameter?>!|): R|kotlin/Unit| + public abstract fun foo(p: R|ft!|): R|kotlin/Unit| } diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.fir.txt index ffd0996a777..23c87c839df 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.fir.txt @@ -1,5 +1,5 @@ public open class SeveralSamParameters : R|kotlin/Any| { - public open static fun findMaxAndInvokeCallback(comparator: R|ft<@FlexibleNullability java/util/Comparator!>, java/util/Comparator!>?>!|, a: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, b: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!|, afterRunnable: R|ft<@FlexibleNullability java/lang/Runnable, java/lang/Runnable?>!|): R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public open static fun findMaxAndInvokeCallback(comparator: R|ft!>, java/util/Comparator!>?>!|, a: R|ft!|, b: R|ft!|, afterRunnable: R|ft!|): R|ft!| public constructor(): R|test/SeveralSamParameters| diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.fir.txt index 7ed0614a0d6..d640c1cbe35 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.fir.txt @@ -1,5 +1,5 @@ public open class TypeParameterOfClass!|> : R|kotlin/Any| { - public open fun foo(comparator: R|ft<@FlexibleNullability java/util/Comparator!>, java/util/Comparator!>?>!|): R|kotlin/Unit| + public open fun foo(comparator: R|ft!>, java/util/Comparator!>?>!|): R|kotlin/Unit| public constructor!|>(): R|test/TypeParameterOfClass| diff --git a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.fir.txt b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.fir.txt index 730e38b2223..78e2598231a 100644 --- a/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.fir.txt +++ b/compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.fir.txt @@ -1,9 +1,9 @@ public open class TypeParameterOfMethod : R|kotlin/Any| { - public open static fun !|> max(comparator: R|ft<@FlexibleNullability java/util/Comparator!>, java/util/Comparator!>?>!|, value1: R|ft<@FlexibleNullability T, T?>!|, value2: R|ft<@FlexibleNullability T, T?>!|): R|ft<@FlexibleNullability T, T?>!| + public open static fun !|> max(comparator: R|ft!>, java/util/Comparator!>?>!|, value1: R|ft!|, value2: R|ft!|): R|ft!| - public open static fun !|> max2(comparator: R|ft<@FlexibleNullability java/util/Comparator!>, java/util/Comparator!>?>!|, value1: R|ft<@FlexibleNullability T, T?>!|, value2: R|ft<@FlexibleNullability T, T?>!|): R|ft<@FlexibleNullability T, T?>!| + public open static fun !|> max2(comparator: R|ft!>, java/util/Comparator!>?>!|, value1: R|ft!|, value2: R|ft!|): R|ft!| - public open static fun !|, B : R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!|> method(a: R|ft<@FlexibleNullability java/util/Comparator!>, java/util/Comparator!>?>!|, b: R|ft<@FlexibleNullability B, B?>!|): R|kotlin/Unit| + public open static fun !|, B : R|ft!>, kotlin/collections/List!>?>!|> method(a: R|ft!>, java/util/Comparator!>?>!|, b: R|ft!|): R|kotlin/Unit| public constructor(): R|test/TypeParameterOfMethod| diff --git a/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.fir.txt b/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.fir.txt index 91356b8ac00..e063f7e7921 100644 --- a/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.fir.txt +++ b/compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.fir.txt @@ -1,5 +1,5 @@ public abstract interface TwoSuperclassesInconsistentGenericTypes : R|kotlin/Any| { - public abstract fun foo(): R|ft<@FlexibleNullability kotlin/collections/MutableList!>, kotlin/collections/List!>?>!| + public abstract fun foo(): R|ft!>, kotlin/collections/List!>?>!| public abstract fun dummy(): R|kotlin/Unit| diff --git a/compiler/testData/loadJava/compiledJava/static/Enum.fir.txt b/compiler/testData/loadJava/compiledJava/static/Enum.fir.txt index 3dd243e3fcb..e1eb914a5df 100644 --- a/compiler/testData/loadJava/compiledJava/static/Enum.fir.txt +++ b/compiler/testData/loadJava/compiledJava/static/Enum.fir.txt @@ -1,7 +1,7 @@ -public final enum class Enum : R|kotlin/Enum!>| { - public final static enum entry A: R|@FlexibleNullability test/Enum| - public final static enum entry B: R|@FlexibleNullability test/Enum| - public final static enum entry C: R|@FlexibleNullability test/Enum| +public final enum class Enum : R|kotlin/Enum!>| { + public final static enum entry A: R|@EnhancedNullability test/Enum| + public final static enum entry B: R|@EnhancedNullability test/Enum| + public final static enum entry C: R|@EnhancedNullability test/Enum| public final static fun values(): R|kotlin/Array| { } diff --git a/compiler/testData/loadJava/compiledJava/static/StaticFinal.fir.txt b/compiler/testData/loadJava/compiledJava/static/StaticFinal.fir.txt index 63082462763..2f10d610e16 100644 --- a/compiler/testData/loadJava/compiledJava/static/StaticFinal.fir.txt +++ b/compiler/testData/loadJava/compiledJava/static/StaticFinal.fir.txt @@ -1,15 +1,15 @@ public open class StaticFinal : R|kotlin/Any| { - public final static field publicNonNull: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(aaa) + public final static field publicNonNull: R|ft!| = String(aaa) - public final static field publicNull: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public final static field publicNull: R|ft!| - public/*package*/ final static field packageNonNull: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(bbb) + public/*package*/ final static field packageNonNull: R|ft!| = String(bbb) - public/*package*/ final static field packageNull: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + public/*package*/ final static field packageNull: R|ft!| - private final static field privateNonNull: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = String(bbb) + private final static field privateNonNull: R|ft!| = String(bbb) - private final static field privateNull: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| + private final static field privateNull: R|ft!| public constructor(): R|test/StaticFinal| diff --git a/compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.fir.txt b/compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.fir.txt index f99c13f4c71..e8cb9988fd1 100644 --- a/compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.fir.txt +++ b/compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.fir.txt @@ -1,8 +1,8 @@ -public final enum class StaticMembersInEnum : R|kotlin/Enum!>| { - public final static enum entry ENTRY: R|@FlexibleNullability test/StaticMembersInEnum| +public final enum class StaticMembersInEnum : R|kotlin/Enum!>| { + public final static enum entry ENTRY: R|@EnhancedNullability test/StaticMembersInEnum| public open static field STATIC_FIELD: R|kotlin/Int| - public final static field CONSTANT: R|ft<@FlexibleNullability test/StaticMembersInEnum, test/StaticMembersInEnum?>!| + public final static field CONSTANT: R|ft!| public open static fun foo(): R|kotlin/Unit| diff --git a/compiler/testData/loadJava/compiledJava/vararg/VarargInt.fir.txt b/compiler/testData/loadJava/compiledJava/vararg/VarargInt.fir.txt index 5555c047952..22229732a63 100644 --- a/compiler/testData/loadJava/compiledJava/vararg/VarargInt.fir.txt +++ b/compiler/testData/loadJava/compiledJava/vararg/VarargInt.fir.txt @@ -1,5 +1,5 @@ public open class VarargInt : R|kotlin/Any| { - public open fun vararg(vararg p: R|ft<@FlexibleNullability kotlin/IntArray, kotlin/IntArray?>!|): R|kotlin/Unit| + public open fun vararg(vararg p: R|ft!|): R|kotlin/Unit| public constructor(): R|test/VarargInt| diff --git a/compiler/testData/loadJava/compiledJava/vararg/VarargString.fir.txt b/compiler/testData/loadJava/compiledJava/vararg/VarargString.fir.txt index 14710ede074..02bd3f033d4 100644 --- a/compiler/testData/loadJava/compiledJava/vararg/VarargString.fir.txt +++ b/compiler/testData/loadJava/compiledJava/vararg/VarargString.fir.txt @@ -1,5 +1,5 @@ public open class VarargString : R|kotlin/Any| { - public open fun vararg(vararg strings: R|ft<@FlexibleNullability kotlin/Array!>, kotlin/Array!>?>!|): R|kotlin/Unit| + public open fun vararg(vararg strings: R|ft!>, kotlin/Array!>?>!|): R|kotlin/Unit| public constructor(): R|test/VarargString|