[FIR] Fix enhancement of FlexibleNullability and EnhancedNullability
- Add utilities to add new attribute to ConeAttributes
- Get rid of FlexibleNullability attribute (it can be easily inferred
for any flexible type at any moment)
- Fix determining of EnhancedNullability attribute
This commit is contained in:
+3
-3
@@ -1,14 +1,14 @@
|
||||
FILE: main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo1|(<L> = foo1@fun <anonymous>(x: R|ft<@FlexibleNullability kotlin/Int, @FlexibleNullability kotlin/Int?>!|): R|ft<@FlexibleNullability kotlin/String, @FlexibleNullability kotlin/String?>!| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo1|(<L> = foo1@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|): R|ft<kotlin/String, kotlin/String?>!| {
|
||||
^ R|<local>/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo2|(<L> = foo2@fun <anonymous>(x: R|ft<@FlexibleNullability kotlin/Number, @FlexibleNullability kotlin/Number?>!|): R|ft<@FlexibleNullability kotlin/CharSequence, @FlexibleNullability kotlin/CharSequence?>!| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo2|(<L> = foo2@fun <anonymous>(x: R|ft<kotlin/Number, kotlin/Number?>!|): R|ft<kotlin/CharSequence, kotlin/CharSequence?>!| {
|
||||
^ R|<local>/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.<Inapplicable(INAPPLICABLE): /JavaUsage.foo2>#(<L> = foo2@fun <anonymous>(x: R|kotlin/Int|): R|ft<@FlexibleNullability kotlin/CharSequence, @FlexibleNullability kotlin/CharSequence?>!| {
|
||||
Q|JavaUsage|.<Inapplicable(INAPPLICABLE): /JavaUsage.foo2>#(<L> = foo2@fun <anonymous>(x: R|kotlin/Int|): R|ft<kotlin/CharSequence, kotlin/CharSequence?>!| {
|
||||
^ R|<local>/x|.R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
|
||||
Vendored
+2
-2
@@ -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|(<L> = foo@fun <anonymous>(x: R|kotlin/Int|): R|ft<@FlexibleNullability kotlin/Boolean, kotlin/Boolean?>!| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(<L> = foo@fun <anonymous>(x: R|kotlin/Int|): R|ft<kotlin/Boolean, kotlin/Boolean?>!| {
|
||||
^ CMP(>, R|<local>/x|.R|kotlin/Int.compareTo|(Int(1)))
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(it: R|kotlin/Int|): R|ft<@FlexibleNullability kotlin/Boolean, kotlin/Boolean?>!| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun <anonymous>(it: R|kotlin/Int|): R|ft<kotlin/Boolean, kotlin/Boolean?>!| {
|
||||
^ CMP(>, R|<local>/it|.R|kotlin/Int.compareTo|(Int(1)))
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ FILE: main.kt
|
||||
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|OverridingUtil|.R|/OverridingUtil.createWithEqualityAxioms|(<L> = l1@fun <anonymous>(c1: R|ft<@FlexibleNullability TypeConstructor, TypeConstructor?>!|, c2: R|ft<@FlexibleNullability TypeConstructor, TypeConstructor?>!|): R|kotlin/Boolean| {
|
||||
Q|OverridingUtil|.R|/OverridingUtil.createWithEqualityAxioms|(<L> = l1@fun <anonymous>(c1: R|ft<TypeConstructor, TypeConstructor?>!|, c2: R|ft<TypeConstructor, TypeConstructor?>!|): R|kotlin/Boolean| {
|
||||
when () {
|
||||
==(R|<local>/c1|.R|/TypeConstructor.x|, R|<local>/c2|.R|/TypeConstructor.x|) -> {
|
||||
^@l1 Boolean(true)
|
||||
|
||||
Reference in New Issue
Block a user