[FIR] ConeAttributes: fix plus method
The 'plus' method was actually creating a new 'ConeAttributes' with only one new attribute due to a typo inside 'buildList' ^KT-60451 ^KT-60504
This commit is contained in:
committed by
Space Team
parent
c605cb9855
commit
4366164b65
+3
-3
@@ -2,16 +2,16 @@ FILE: test.kt
|
|||||||
public abstract interface StringSet : R|kotlin/collections/MutableSet<kotlin/String>| {
|
public abstract interface StringSet : R|kotlin/collections/MutableSet<kotlin/String>| {
|
||||||
}
|
}
|
||||||
public final fun foo(arg: R|kotlin/Boolean|): R|kotlin/Unit| {
|
public final fun foo(arg: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||||
lval x: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, @EnhancedNullability java/util/ArrayList<*>>| = Q|Producer|.R|/Producer.foo*s|()
|
lval x: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, Raw type java/util/ArrayList<*>>| = Q|Producer|.R|/Producer.foo*s|()
|
||||||
when () {
|
when () {
|
||||||
(R|<local>/x| is R|kotlin/collections/Set<*>|) -> {
|
(R|<local>/x| is R|kotlin/collections/Set<*>|) -> {
|
||||||
lval y: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, @EnhancedNullability java/util/ArrayList<*>>| = R|<local>/x|
|
lval y: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, Raw type java/util/ArrayList<*>>| = R|<local>/x|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
when () {
|
when () {
|
||||||
(R|<local>/x| is R|kotlin/collections/MutableSet<*>|) -> {
|
(R|<local>/x| is R|kotlin/collections/MutableSet<*>|) -> {
|
||||||
lval y: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, @EnhancedNullability java/util/ArrayList<*>>| = R|<local>/x|
|
lval y: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, Raw type java/util/ArrayList<*>>| = R|<local>/x|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,9 +96,10 @@ class ConeAttributes private constructor(attributes: List<ConeAttribute<*>>) : A
|
|||||||
if (attribute in this) return this
|
if (attribute in this) return this
|
||||||
if (isEmpty()) return predefinedAttributes[attribute] ?: ConeAttributes(attribute)
|
if (isEmpty()) return predefinedAttributes[attribute] ?: ConeAttributes(attribute)
|
||||||
val newAttributes = buildList {
|
val newAttributes = buildList {
|
||||||
addAll(this)
|
addAll(arrayMap)
|
||||||
add(attribute)
|
add(attribute)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ConeAttributes(newAttributes)
|
return ConeAttributes(newAttributes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+45
@@ -0,0 +1,45 @@
|
|||||||
|
// LL_FIR_DIVERGENCE
|
||||||
|
// KT-60504
|
||||||
|
// LL_FIR_DIVERGENCE
|
||||||
|
// !RENDER_DIAGNOSTICS_MESSAGES
|
||||||
|
// SKIP_JAVAC
|
||||||
|
|
||||||
|
// FILE: A.java
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@javax.annotation.meta.TypeQualifier
|
||||||
|
public @interface MyTypeQualifier {}
|
||||||
|
|
||||||
|
@An
|
||||||
|
public interface A {
|
||||||
|
@NotNull
|
||||||
|
@An
|
||||||
|
@MyTypeQualifier
|
||||||
|
String foo();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: k.kt
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
|
||||||
|
annotation class An
|
||||||
|
|
||||||
|
class B : A {
|
||||||
|
override fun foo(): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE("foo; @NotNull() @An() @MyTypeQualifier() fun foo(): @EnhancedNullability @R|An|() String")!>String?<!> = null
|
||||||
|
}
|
||||||
|
|
||||||
|
@An
|
||||||
|
public interface C {
|
||||||
|
@NotNull
|
||||||
|
@An
|
||||||
|
fun foo(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
class D : C {
|
||||||
|
override fun foo(): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE("foo; @NotNull() @An() fun foo(): String")!>String?<!> = null
|
||||||
|
}
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/main.kt:(98,103): error: Argument type mismatch: actual type is 'V' but '@EnhancedNullability V & Any' was expected
|
/main.kt:(98,103): error: Argument type mismatch: actual type is 'V' but '@EnhancedNullability V & Any' was expected
|
||||||
|
|
||||||
/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin/collections/List<V>' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability V & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability V & Any>>' was expected
|
/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin/collections/List<V>' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() V & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() V & Any>>' was expected
|
||||||
|
|
||||||
/main.kt:(133,138): error: Argument type mismatch: actual type is 'V' but '@EnhancedNullability E & Any' was expected
|
/main.kt:(133,138): error: Argument type mismatch: actual type is 'V' but '@EnhancedNullability E & Any' was expected
|
||||||
|
|
||||||
/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin/collections/List<V>' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability E & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability E & Any>>' was expected
|
/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin/collections/List<V>' but 'ft<@EnhancedNullability kotlin/collections/MutableList<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() E & Any>, @EnhancedNullability kotlin/collections/List<@EnhancedNullability @R|org/jetbrains/annotations/NotNull|() E & Any>>' was expected
|
||||||
|
|||||||
compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.ir.txt
Vendored
+50
-50
@@ -131,66 +131,66 @@ FILE fqName:<root> fileName:/enhancedNullabilityInDestructuringAssignment.kt
|
|||||||
y: GET_VAR 'val y: kotlin.Int declared in <root>.test1' type=kotlin.Int origin=null
|
y: GET_VAR 'val y: kotlin.Int declared in <root>.test1' type=kotlin.Int origin=null
|
||||||
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:@[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:@[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? [val]
|
||||||
CALL 'public open fun notNullComponents (): @[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? declared in <root>.J' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? origin=null
|
CALL 'public open fun notNullComponents (): @[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? declared in <root>.J' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? origin=null
|
||||||
VAR name:x type:@[EnhancedNullability] kotlin.String [val]
|
VAR name:x type:@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String [val]
|
||||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
TYPE_OP type=@[NotNull(value = <null>)] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] kotlin.String
|
||||||
CALL 'public final fun component1 (): T1 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] kotlin.String origin=COMPONENT_N(index=1)
|
CALL 'public final fun component1 (): T1 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=COMPONENT_N(index=1)
|
||||||
$this: GET_VAR 'val tmp_1: @[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? declared in <root>.test2' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? origin=null
|
$this: GET_VAR 'val tmp_1: @[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? declared in <root>.test2' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? origin=null
|
||||||
VAR name:y type:@[EnhancedNullability] kotlin.String [val]
|
VAR name:y type:@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String [val]
|
||||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
TYPE_OP type=@[NotNull(value = <null>)] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] kotlin.String
|
||||||
CALL 'public final fun component2 (): T2 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] kotlin.String origin=COMPONENT_N(index=2)
|
CALL 'public final fun component2 (): T2 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=COMPONENT_N(index=2)
|
||||||
$this: GET_VAR 'val tmp_1: @[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? declared in <root>.test2' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? origin=null
|
$this: GET_VAR 'val tmp_1: @[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? declared in <root>.test2' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? origin=null
|
||||||
CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
x: GET_VAR 'val x: @[EnhancedNullability] kotlin.String declared in <root>.test2' type=@[EnhancedNullability] kotlin.String origin=null
|
x: GET_VAR 'val x: @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String declared in <root>.test2' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=null
|
||||||
y: GET_VAR 'val y: @[EnhancedNullability] kotlin.String declared in <root>.test2' type=@[EnhancedNullability] kotlin.String origin=null
|
y: GET_VAR 'val y: @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String declared in <root>.test2' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=null
|
||||||
FUN name:test2Desugared visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:test2Desugared visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
VAR name:tmp type:@[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? [val]
|
VAR name:tmp type:@[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? [val]
|
||||||
CALL 'public open fun notNullComponents (): @[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? declared in <root>.J' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? origin=null
|
CALL 'public open fun notNullComponents (): @[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? declared in <root>.J' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? origin=null
|
||||||
VAR name:x type:kotlin.String [val]
|
VAR name:x type:@[NotNull(value = <null>)] kotlin.String [val]
|
||||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
TYPE_OP type=@[NotNull(value = <null>)] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] kotlin.String
|
||||||
CALL 'public final fun component1 (): T1 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] kotlin.String origin=null
|
CALL 'public final fun component1 (): T1 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=null
|
||||||
$this: GET_VAR 'val tmp: @[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? declared in <root>.test2Desugared' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? origin=null
|
$this: GET_VAR 'val tmp: @[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? declared in <root>.test2Desugared' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? origin=null
|
||||||
VAR name:y type:kotlin.String [val]
|
VAR name:y type:@[NotNull(value = <null>)] kotlin.String [val]
|
||||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
TYPE_OP type=@[NotNull(value = <null>)] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] kotlin.String
|
||||||
CALL 'public final fun component2 (): T2 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] kotlin.String origin=null
|
CALL 'public final fun component2 (): T2 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=null
|
||||||
$this: GET_VAR 'val tmp: @[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? declared in <root>.test2Desugared' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>? origin=null
|
$this: GET_VAR 'val tmp: @[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? declared in <root>.test2Desugared' type=@[FlexibleNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>? origin=null
|
||||||
CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
x: GET_VAR 'val x: kotlin.String declared in <root>.test2Desugared' type=kotlin.String origin=null
|
x: GET_VAR 'val x: @[NotNull(value = <null>)] kotlin.String declared in <root>.test2Desugared' type=@[NotNull(value = <null>)] kotlin.String origin=null
|
||||||
y: GET_VAR 'val y: kotlin.String declared in <root>.test2Desugared' type=kotlin.String origin=null
|
y: GET_VAR 'val y: @[NotNull(value = <null>)] kotlin.String declared in <root>.test2Desugared' type=@[NotNull(value = <null>)] kotlin.String origin=null
|
||||||
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String> [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String> [val]
|
||||||
TYPE_OP type=<root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String> origin=IMPLICIT_NOTNULL typeOperand=<root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String>
|
TYPE_OP type=<root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String> origin=IMPLICIT_NOTNULL typeOperand=<root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String>
|
||||||
CALL 'public open fun notNullQAndComponents (): @[EnhancedNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String> declared in <root>.J' type=@[EnhancedNullability] <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String> origin=null
|
CALL 'public open fun notNullQAndComponents (): @[EnhancedNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String> declared in <root>.J' type=@[EnhancedNullability] <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String> origin=null
|
||||||
VAR name:x type:@[EnhancedNullability] kotlin.String [val]
|
VAR name:x type:@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String [val]
|
||||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
TYPE_OP type=@[NotNull(value = <null>)] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] kotlin.String
|
||||||
CALL 'public final fun component1 (): T1 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] kotlin.String origin=COMPONENT_N(index=1)
|
CALL 'public final fun component1 (): T1 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=COMPONENT_N(index=1)
|
||||||
$this: GET_VAR 'val tmp_2: <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String> declared in <root>.test3' type=<root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String> origin=null
|
$this: GET_VAR 'val tmp_2: <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String> declared in <root>.test3' type=<root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String> origin=null
|
||||||
VAR name:y type:@[EnhancedNullability] kotlin.String [val]
|
VAR name:y type:@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String [val]
|
||||||
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
|
TYPE_OP type=@[NotNull(value = <null>)] kotlin.String origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] kotlin.String
|
||||||
CALL 'public final fun component2 (): T2 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] kotlin.String origin=COMPONENT_N(index=2)
|
CALL 'public final fun component2 (): T2 of <root>.Q declared in <root>.Q' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=COMPONENT_N(index=2)
|
||||||
$this: GET_VAR 'val tmp_2: <root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String> declared in <root>.test3' type=<root>.Q<@[EnhancedNullability] kotlin.String, @[EnhancedNullability] kotlin.String> origin=null
|
$this: GET_VAR 'val tmp_2: <root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String> declared in <root>.test3' type=<root>.Q<@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String, @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String> origin=null
|
||||||
CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
x: GET_VAR 'val x: @[EnhancedNullability] kotlin.String declared in <root>.test3' type=@[EnhancedNullability] kotlin.String origin=null
|
x: GET_VAR 'val x: @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String declared in <root>.test3' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=null
|
||||||
y: GET_VAR 'val y: @[EnhancedNullability] kotlin.String declared in <root>.test3' type=@[EnhancedNullability] kotlin.String origin=null
|
y: GET_VAR 'val y: @[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String declared in <root>.test3' type=@[EnhancedNullability] @[NotNull(value = <null>)] kotlin.String origin=null
|
||||||
FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.IndexedValue<@[EnhancedNullability] <root>.P> [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.IndexedValue<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> [val]
|
||||||
CALL 'public final fun first <T> (): T of kotlin.collections.first declared in kotlin.collections' type=kotlin.collections.IndexedValue<@[EnhancedNullability] <root>.P> origin=null
|
CALL 'public final fun first <T> (): T of kotlin.collections.first declared in kotlin.collections' type=kotlin.collections.IndexedValue<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
<T>: kotlin.collections.IndexedValue<@[EnhancedNullability] <root>.P>
|
<T>: kotlin.collections.IndexedValue<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>
|
||||||
$receiver: CALL 'public final fun withIndex <T> (): kotlin.collections.Iterable<kotlin.collections.IndexedValue<T of kotlin.collections.withIndex>> declared in kotlin.collections' type=kotlin.collections.Iterable<kotlin.collections.IndexedValue<@[EnhancedNullability] <root>.P>> origin=null
|
$receiver: CALL 'public final fun withIndex <T> (): kotlin.collections.Iterable<kotlin.collections.IndexedValue<T of kotlin.collections.withIndex>> declared in kotlin.collections' type=kotlin.collections.Iterable<kotlin.collections.IndexedValue<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>> origin=null
|
||||||
<T>: @[EnhancedNullability] <root>.P
|
<T>: @[EnhancedNullability] @[NotNull(value = <null>)] <root>.P
|
||||||
$receiver: TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P> origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>
|
$receiver: TYPE_OP type=@[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=IMPLICIT_NOTNULL typeOperand=@[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>
|
||||||
CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? origin=null
|
CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? origin=null
|
||||||
VAR name:x type:kotlin.Int [val]
|
VAR name:x type:kotlin.Int [val]
|
||||||
CALL 'public final fun component1 (): kotlin.Int declared in kotlin.collections.IndexedValue' type=kotlin.Int origin=COMPONENT_N(index=1)
|
CALL 'public final fun component1 (): kotlin.Int declared in kotlin.collections.IndexedValue' type=kotlin.Int origin=COMPONENT_N(index=1)
|
||||||
$this: GET_VAR 'val tmp_3: kotlin.collections.IndexedValue<@[EnhancedNullability] <root>.P> declared in <root>.test4' type=kotlin.collections.IndexedValue<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val tmp_3: kotlin.collections.IndexedValue<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.test4' type=kotlin.collections.IndexedValue<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
VAR name:y type:@[EnhancedNullability] <root>.P [val]
|
VAR name:y type:@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P [val]
|
||||||
TYPE_OP type=<root>.P origin=IMPLICIT_NOTNULL typeOperand=<root>.P
|
TYPE_OP type=@[NotNull(value = <null>)] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] <root>.P
|
||||||
CALL 'public final fun component2 (): T of kotlin.collections.IndexedValue declared in kotlin.collections.IndexedValue' type=@[EnhancedNullability] <root>.P origin=COMPONENT_N(index=2)
|
CALL 'public final fun component2 (): T of kotlin.collections.IndexedValue declared in kotlin.collections.IndexedValue' type=@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P origin=COMPONENT_N(index=2)
|
||||||
$this: GET_VAR 'val tmp_3: kotlin.collections.IndexedValue<@[EnhancedNullability] <root>.P> declared in <root>.test4' type=kotlin.collections.IndexedValue<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val tmp_3: kotlin.collections.IndexedValue<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.test4' type=kotlin.collections.IndexedValue<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (x: kotlin.Any, y: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
x: GET_VAR 'val x: kotlin.Int declared in <root>.test4' type=kotlin.Int origin=null
|
x: GET_VAR 'val x: kotlin.Int declared in <root>.test4' type=kotlin.Int origin=null
|
||||||
y: GET_VAR 'val y: @[EnhancedNullability] <root>.P declared in <root>.test4' type=@[EnhancedNullability] <root>.P origin=null
|
y: GET_VAR 'val y: @[EnhancedNullability] @[NotNull(value = <null>)] <root>.P declared in <root>.test4' type=@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P origin=null
|
||||||
|
|||||||
compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt
Vendored
+11
-11
@@ -59,30 +59,30 @@ fun test1() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun test2() {
|
fun test2() {
|
||||||
val <destruct>: @FlexibleNullability Q<@EnhancedNullability String, @EnhancedNullability String>? = notNullComponents()
|
val <destruct>: @FlexibleNullability Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String>? = notNullComponents()
|
||||||
val x: @EnhancedNullability String = <destruct>.component1() /*!! String */
|
val x: @EnhancedNullability @NotNull String = <destruct>.component1() /*!! @NotNull String */
|
||||||
val y: @EnhancedNullability String = <destruct>.component2() /*!! String */
|
val y: @EnhancedNullability @NotNull String = <destruct>.component2() /*!! @NotNull String */
|
||||||
use(x = x, y = y)
|
use(x = x, y = y)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test2Desugared() {
|
fun test2Desugared() {
|
||||||
val tmp: @FlexibleNullability Q<@EnhancedNullability String, @EnhancedNullability String>? = notNullComponents()
|
val tmp: @FlexibleNullability Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String>? = notNullComponents()
|
||||||
val x: String = tmp.component1() /*!! String */
|
val x: @NotNull String = tmp.component1() /*!! @NotNull String */
|
||||||
val y: String = tmp.component2() /*!! String */
|
val y: @NotNull String = tmp.component2() /*!! @NotNull String */
|
||||||
use(x = x, y = y)
|
use(x = x, y = y)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test3() {
|
fun test3() {
|
||||||
val <destruct>: Q<@EnhancedNullability String, @EnhancedNullability String> = notNullQAndComponents() /*!! Q<@EnhancedNullability String, @EnhancedNullability String> */
|
val <destruct>: Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String> = notNullQAndComponents() /*!! Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String> */
|
||||||
val x: @EnhancedNullability String = <destruct>.component1() /*!! String */
|
val x: @EnhancedNullability @NotNull String = <destruct>.component1() /*!! @NotNull String */
|
||||||
val y: @EnhancedNullability String = <destruct>.component2() /*!! String */
|
val y: @EnhancedNullability @NotNull String = <destruct>.component2() /*!! @NotNull String */
|
||||||
use(x = x, y = y)
|
use(x = x, y = y)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test4() {
|
fun test4() {
|
||||||
val <destruct>: IndexedValue<@EnhancedNullability P> = listOfNotNull() /*!! @FlexibleMutability MutableList<@EnhancedNullability P> */.withIndex<@EnhancedNullability P>().first<IndexedValue<@EnhancedNullability P>>()
|
val <destruct>: IndexedValue<@EnhancedNullability @NotNull P> = listOfNotNull() /*!! @FlexibleMutability MutableList<@EnhancedNullability @NotNull P> */.withIndex<@EnhancedNullability @NotNull P>().first<IndexedValue<@EnhancedNullability @NotNull P>>()
|
||||||
val x: Int = <destruct>.component1()
|
val x: Int = <destruct>.component1()
|
||||||
val y: @EnhancedNullability P = <destruct>.component2() /*!! P */
|
val y: @EnhancedNullability @NotNull P = <destruct>.component2() /*!! @NotNull P */
|
||||||
use(x = x, y = y)
|
use(x = x, y = y)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+36
-36
@@ -5,52 +5,52 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
|
|||||||
FUN name:testForInListUnused visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:testForInListUnused visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||||
VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> [val]
|
VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> [val]
|
||||||
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=FOR_LOOP_ITERATOR
|
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=FOR_LOOP_ITERATOR
|
||||||
$this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? origin=null
|
$this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? origin=null
|
||||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.MutableIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.MutableIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||||
$this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> declared in <root>.testForInListUnused' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.testForInListUnused' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||||
VAR FOR_LOOP_VARIABLE name:x type:<root>.P [val]
|
VAR FOR_LOOP_VARIABLE name:x type:@[NotNull(value = <null>)] <root>.P [val]
|
||||||
TYPE_OP type=<root>.P origin=IMPLICIT_NOTNULL typeOperand=<root>.P
|
TYPE_OP type=@[NotNull(value = <null>)] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] <root>.P
|
||||||
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator declared in kotlin.collections.MutableIterator' type=@[EnhancedNullability] <root>.P origin=FOR_LOOP_NEXT
|
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator declared in kotlin.collections.MutableIterator' type=@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P origin=FOR_LOOP_NEXT
|
||||||
$this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> declared in <root>.testForInListUnused' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.testForInListUnused' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
BLOCK type=kotlin.Unit origin=null
|
BLOCK type=kotlin.Unit origin=null
|
||||||
FUN name:testForInListDestructured visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:testForInListDestructured visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||||
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> [val]
|
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> [val]
|
||||||
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=FOR_LOOP_ITERATOR
|
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=FOR_LOOP_ITERATOR
|
||||||
$this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? origin=null
|
$this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? origin=null
|
||||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.MutableIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.MutableIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||||
$this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> declared in <root>.testForInListDestructured' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.testForInListDestructured' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.P [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:@[NotNull(value = <null>)] <root>.P [val]
|
||||||
TYPE_OP type=<root>.P origin=IMPLICIT_NOTNULL typeOperand=<root>.P
|
TYPE_OP type=@[NotNull(value = <null>)] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] <root>.P
|
||||||
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator declared in kotlin.collections.MutableIterator' type=@[EnhancedNullability] <root>.P origin=FOR_LOOP_NEXT
|
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator declared in kotlin.collections.MutableIterator' type=@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P origin=FOR_LOOP_NEXT
|
||||||
$this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> declared in <root>.testForInListDestructured' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.testForInListDestructured' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
VAR name:x type:kotlin.Int [val]
|
VAR name:x type:kotlin.Int [val]
|
||||||
CALL 'public final fun component1 (): kotlin.Int declared in <root>.P' type=kotlin.Int origin=COMPONENT_N(index=1)
|
CALL 'public final fun component1 (): kotlin.Int declared in <root>.P' type=kotlin.Int origin=COMPONENT_N(index=1)
|
||||||
$this: GET_VAR 'val tmp_2: <root>.P declared in <root>.testForInListDestructured' type=<root>.P origin=null
|
$this: GET_VAR 'val tmp_2: @[NotNull(value = <null>)] <root>.P declared in <root>.testForInListDestructured' type=@[NotNull(value = <null>)] <root>.P origin=null
|
||||||
VAR name:y type:kotlin.Int [val]
|
VAR name:y type:kotlin.Int [val]
|
||||||
CALL 'public final fun component2 (): kotlin.Int declared in <root>.P' type=kotlin.Int origin=COMPONENT_N(index=2)
|
CALL 'public final fun component2 (): kotlin.Int declared in <root>.P' type=kotlin.Int origin=COMPONENT_N(index=2)
|
||||||
$this: GET_VAR 'val tmp_2: <root>.P declared in <root>.testForInListDestructured' type=<root>.P origin=null
|
$this: GET_VAR 'val tmp_2: @[NotNull(value = <null>)] <root>.P declared in <root>.testForInListDestructured' type=@[NotNull(value = <null>)] <root>.P origin=null
|
||||||
BLOCK type=kotlin.Unit origin=null
|
BLOCK type=kotlin.Unit origin=null
|
||||||
FUN name:testDesugaredForInList visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:testDesugaredForInList visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
VAR name:iterator type:kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> [val]
|
VAR name:iterator type:kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> [val]
|
||||||
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
$this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? origin=null
|
$this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? origin=null
|
||||||
WHILE label=null origin=WHILE_LOOP
|
WHILE label=null origin=WHILE_LOOP
|
||||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.MutableIterator' type=kotlin.Boolean origin=null
|
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.MutableIterator' type=kotlin.Boolean origin=null
|
||||||
$this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> declared in <root>.testDesugaredForInList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.testDesugaredForInList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
body: BLOCK type=kotlin.Unit origin=null
|
body: BLOCK type=kotlin.Unit origin=null
|
||||||
VAR name:x type:<root>.P [val]
|
VAR name:x type:@[NotNull(value = <null>)] <root>.P [val]
|
||||||
TYPE_OP type=<root>.P origin=IMPLICIT_NOTNULL typeOperand=<root>.P
|
TYPE_OP type=@[NotNull(value = <null>)] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] <root>.P
|
||||||
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator declared in kotlin.collections.MutableIterator' type=@[EnhancedNullability] <root>.P origin=null
|
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator declared in kotlin.collections.MutableIterator' type=@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P origin=null
|
||||||
$this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> declared in <root>.testDesugaredForInList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.testDesugaredForInList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
FUN name:testForInArrayUnused visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
|
FUN name:testForInArrayUnused visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
|
||||||
VALUE_PARAMETER name:j index:0 type:<root>.J
|
VALUE_PARAMETER name:j index:0 type:<root>.J
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
@@ -71,22 +71,22 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
|
|||||||
FUN name:testForInListUse visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:testForInListUse visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||||
VAR FOR_LOOP_ITERATOR name:tmp_4 type:kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> [val]
|
VAR FOR_LOOP_ITERATOR name:tmp_4 type:kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> [val]
|
||||||
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=FOR_LOOP_ITERATOR
|
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=FOR_LOOP_ITERATOR
|
||||||
$this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] <root>.P>? origin=null
|
$this: CALL 'public open fun listOfNotNull (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P>? origin=null
|
||||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.MutableIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.MutableIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||||
$this: GET_VAR 'val tmp_4: kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> declared in <root>.testForInListUse' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val tmp_4: kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.testForInListUse' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||||
VAR FOR_LOOP_VARIABLE name:x type:<root>.P [val]
|
VAR FOR_LOOP_VARIABLE name:x type:@[NotNull(value = <null>)] <root>.P [val]
|
||||||
TYPE_OP type=<root>.P origin=IMPLICIT_NOTNULL typeOperand=<root>.P
|
TYPE_OP type=@[NotNull(value = <null>)] <root>.P origin=IMPLICIT_NOTNULL typeOperand=@[NotNull(value = <null>)] <root>.P
|
||||||
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator declared in kotlin.collections.MutableIterator' type=@[EnhancedNullability] <root>.P origin=FOR_LOOP_NEXT
|
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator declared in kotlin.collections.MutableIterator' type=@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P origin=FOR_LOOP_NEXT
|
||||||
$this: GET_VAR 'val tmp_4: kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> declared in <root>.testForInListUse' type=kotlin.collections.MutableIterator<@[EnhancedNullability] <root>.P> origin=null
|
$this: GET_VAR 'val tmp_4: kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> declared in <root>.testForInListUse' type=kotlin.collections.MutableIterator<@[EnhancedNullability] @[NotNull(value = <null>)] <root>.P> origin=null
|
||||||
BLOCK type=kotlin.Unit origin=null
|
BLOCK type=kotlin.Unit origin=null
|
||||||
CALL 'public final fun use (s: <root>.P): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (s: <root>.P): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
s: GET_VAR 'val x: <root>.P declared in <root>.testForInListUse' type=<root>.P origin=null
|
s: GET_VAR 'val x: @[NotNull(value = <null>)] <root>.P declared in <root>.testForInListUse' type=@[NotNull(value = <null>)] <root>.P origin=null
|
||||||
CALL 'public open fun use (s: @[EnhancedNullability] <root>.P): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
|
CALL 'public open fun use (s: @[EnhancedNullability] <root>.P): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
|
||||||
s: GET_VAR 'val x: <root>.P declared in <root>.testForInListUse' type=<root>.P origin=null
|
s: GET_VAR 'val x: @[NotNull(value = <null>)] <root>.P declared in <root>.testForInListUse' type=@[NotNull(value = <null>)] <root>.P origin=null
|
||||||
FUN name:testForInArrayUse visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
|
FUN name:testForInArrayUse visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
|
||||||
VALUE_PARAMETER name:j index:0 type:<root>.J
|
VALUE_PARAMETER name:j index:0 type:<root>.J
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
|
|||||||
+8
-8
@@ -3,9 +3,9 @@ fun use(s: P) {
|
|||||||
|
|
||||||
fun testForInListUnused() {
|
fun testForInListUnused() {
|
||||||
{ // BLOCK
|
{ // BLOCK
|
||||||
val <iterator>: MutableIterator<@EnhancedNullability P> = listOfNotNull().iterator()
|
val <iterator>: MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator()
|
||||||
while (<iterator>.hasNext()) { // BLOCK
|
while (<iterator>.hasNext()) { // BLOCK
|
||||||
val x: P = <iterator>.next() /*!! P */
|
val x: @NotNull P = <iterator>.next() /*!! @NotNull P */
|
||||||
{ // BLOCK
|
{ // BLOCK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,9 +14,9 @@ fun testForInListUnused() {
|
|||||||
|
|
||||||
fun testForInListDestructured() {
|
fun testForInListDestructured() {
|
||||||
{ // BLOCK
|
{ // BLOCK
|
||||||
val <iterator>: MutableIterator<@EnhancedNullability P> = listOfNotNull().iterator()
|
val <iterator>: MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator()
|
||||||
while (<iterator>.hasNext()) { // BLOCK
|
while (<iterator>.hasNext()) { // BLOCK
|
||||||
val <destruct>: P = <iterator>.next() /*!! P */
|
val <destruct>: @NotNull P = <iterator>.next() /*!! @NotNull P */
|
||||||
val x: Int = <destruct>.component1()
|
val x: Int = <destruct>.component1()
|
||||||
val y: Int = <destruct>.component2()
|
val y: Int = <destruct>.component2()
|
||||||
{ // BLOCK
|
{ // BLOCK
|
||||||
@@ -26,9 +26,9 @@ fun testForInListDestructured() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testDesugaredForInList() {
|
fun testDesugaredForInList() {
|
||||||
val iterator: MutableIterator<@EnhancedNullability P> = listOfNotNull().iterator()
|
val iterator: MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator()
|
||||||
while (iterator.hasNext()) { // BLOCK
|
while (iterator.hasNext()) { // BLOCK
|
||||||
val x: P = iterator.next() /*!! P */
|
val x: @NotNull P = iterator.next() /*!! @NotNull P */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,9 +45,9 @@ fun testForInArrayUnused(j: J) {
|
|||||||
|
|
||||||
fun testForInListUse() {
|
fun testForInListUse() {
|
||||||
{ // BLOCK
|
{ // BLOCK
|
||||||
val <iterator>: MutableIterator<@EnhancedNullability P> = listOfNotNull().iterator()
|
val <iterator>: MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator()
|
||||||
while (<iterator>.hasNext()) { // BLOCK
|
while (<iterator>.hasNext()) { // BLOCK
|
||||||
val x: P = <iterator>.next() /*!! P */
|
val x: @NotNull P = <iterator>.next() /*!! @NotNull P */
|
||||||
{ // BLOCK
|
{ // BLOCK
|
||||||
use(s = x)
|
use(s = x)
|
||||||
use(s = x)
|
use(s = x)
|
||||||
|
|||||||
Reference in New Issue
Block a user