[FIR2IR] Fix considering of Contains intrinsic

This commit is contained in:
Ivan Kochurkin
2021-10-13 19:29:22 +03:00
committed by TeamCityServer
parent 15d23f2a72
commit 0d91e16a15
13 changed files with 8 additions and 17 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ FILE fqName:<root> fileName:/in.kt
VALUE_PARAMETER name:x index:1 type:kotlin.collections.Collection<kotlin.Any>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any, x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean declared in <root>'
CALL 'public abstract fun contains (element: E of kotlin.collections.Collection): kotlin.Boolean [operator] declared in kotlin.collections.Collection' type=kotlin.Boolean origin=null
CALL 'public abstract fun contains (element: E of kotlin.collections.Collection): kotlin.Boolean [operator] declared in kotlin.collections.Collection' type=kotlin.Boolean origin=IN
$this: GET_VAR 'x: kotlin.collections.Collection<kotlin.Any> declared in <root>.test1' type=kotlin.collections.Collection<kotlin.Any> origin=null
element: GET_VAR 'a: kotlin.Any declared in <root>.test1' type=kotlin.Any origin=null
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any, x:kotlin.collections.Collection<kotlin.Any>) returnType:kotlin.Boolean
@@ -13,7 +13,7 @@ FILE fqName:<root> fileName:/in.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any, x: kotlin.collections.Collection<kotlin.Any>): kotlin.Boolean declared in <root>'
CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null
$this: CALL 'public abstract fun contains (element: E of kotlin.collections.Collection): kotlin.Boolean [operator] declared in kotlin.collections.Collection' type=kotlin.Boolean origin=null
$this: CALL 'public abstract fun contains (element: E of kotlin.collections.Collection): kotlin.Boolean [operator] declared in kotlin.collections.Collection' type=kotlin.Boolean origin=IN
$this: GET_VAR 'x: kotlin.collections.Collection<kotlin.Any> declared in <root>.test2' type=kotlin.collections.Collection<kotlin.Any> origin=null
element: GET_VAR 'a: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
FUN name:test3 visibility:public modality:FINAL <T> (a:T of <root>.test3, x:kotlin.collections.Collection<T of <root>.test3>) returnType:kotlin.Boolean
@@ -22,7 +22,7 @@ FILE fqName:<root> fileName:/in.kt
VALUE_PARAMETER name:x index:1 type:kotlin.collections.Collection<T of <root>.test3>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 <T> (a: T of <root>.test3, x: kotlin.collections.Collection<T of <root>.test3>): kotlin.Boolean declared in <root>'
CALL 'public abstract fun contains (element: E of kotlin.collections.Collection): kotlin.Boolean [operator] declared in kotlin.collections.Collection' type=kotlin.Boolean origin=null
CALL 'public abstract fun contains (element: E of kotlin.collections.Collection): kotlin.Boolean [operator] declared in kotlin.collections.Collection' type=kotlin.Boolean origin=IN
$this: GET_VAR 'x: kotlin.collections.Collection<T of <root>.test3> declared in <root>.test3' type=kotlin.collections.Collection<T of <root>.test3> origin=null
element: GET_VAR 'a: T of <root>.test3 declared in <root>.test3' type=T of <root>.test3 origin=null
FUN name:test4 visibility:public modality:FINAL <T> (a:T of <root>.test4, x:kotlin.collections.Collection<T of <root>.test4>) returnType:kotlin.Boolean
@@ -32,6 +32,6 @@ FILE fqName:<root> fileName:/in.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test4 <T> (a: T of <root>.test4, x: kotlin.collections.Collection<T of <root>.test4>): kotlin.Boolean declared in <root>'
CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null
$this: CALL 'public abstract fun contains (element: E of kotlin.collections.Collection): kotlin.Boolean [operator] declared in kotlin.collections.Collection' type=kotlin.Boolean origin=null
$this: CALL 'public abstract fun contains (element: E of kotlin.collections.Collection): kotlin.Boolean [operator] declared in kotlin.collections.Collection' type=kotlin.Boolean origin=IN
$this: GET_VAR 'x: kotlin.collections.Collection<T of <root>.test4> declared in <root>.test4' type=kotlin.collections.Collection<T of <root>.test4> origin=null
element: GET_VAR 'a: T of <root>.test4 declared in <root>.test4' type=T of <root>.test4 origin=null
+2 -2
View File
@@ -45,7 +45,7 @@ FILE fqName:<root> fileName:/when.kt
GET_VAR 'val tmp_0: kotlin.Any? [val] declared in <root>.testWithSubject' type=kotlin.Any? origin=null
then: CONST String type=kotlin.String value="!Number"
BRANCH
if: CALL 'public final fun contains <T> (element: T of kotlin.collections.CollectionsKt.contains): kotlin.Boolean [operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Boolean origin=null
if: CALL 'public final fun contains <T> (element: T of kotlin.collections.CollectionsKt.contains): kotlin.Boolean [operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Boolean origin=IN
<T>: kotlin.Any?
$receiver: CALL 'public final fun setOf <T> (): kotlin.collections.Set<T of kotlin.collections.SetsKt.setOf> [inline] declared in kotlin.collections.SetsKt' type=kotlin.collections.Set<kotlin.Nothing> origin=null
<T>: kotlin.Nothing
@@ -78,7 +78,7 @@ FILE fqName:<root> fileName:/when.kt
GET_VAR 'x: kotlin.Any? declared in <root>.test' type=kotlin.Any? origin=null
then: CONST String type=kotlin.String value="!Number"
BRANCH
if: CALL 'public final fun contains <T> (element: T of kotlin.collections.CollectionsKt.contains): kotlin.Boolean [operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Boolean origin=null
if: CALL 'public final fun contains <T> (element: T of kotlin.collections.CollectionsKt.contains): kotlin.Boolean [operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Boolean origin=IN
<T>: kotlin.Number
$receiver: CALL 'public final fun setOf <T> (): kotlin.collections.Set<T of kotlin.collections.SetsKt.setOf> [inline] declared in kotlin.collections.SetsKt' type=kotlin.collections.Set<kotlin.Nothing> origin=null
<T>: kotlin.Nothing