[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:
Dmitriy Novozhilov
2021-03-09 14:51:19 +03:00
parent 0108f8a1b4
commit 65ea4e184a
290 changed files with 1395 additions and 2037 deletions
@@ -8,15 +8,15 @@ FILE: test.kt
public final fun test(e: R|MyException|, stream: R|java/io/PrintStream|): R|kotlin/Unit| {
R|<local>/e|.R|java/lang/Throwable.printStackTrace|()
R|<local>/e|.R|java/lang/Throwable.printStackTrace|(R|<local>/stream|)
lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|<local>/e|.R|java/lang/Throwable.getLocalizedMessage|()
lval result: R|ft<kotlin/String, kotlin/String?>!| = R|<local>/e|.R|java/lang/Throwable.getLocalizedMessage|()
}
public final fun test(e: R|YourException|, stream: R|java/io/PrintStream|): R|kotlin/Unit| {
R|<local>/e|.R|java/lang/Throwable.printStackTrace|()
R|<local>/e|.R|java/lang/Throwable.printStackTrace|(R|<local>/stream|)
lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|<local>/e|.R|java/lang/Throwable.getLocalizedMessage|()
lval result: R|ft<kotlin/String, kotlin/String?>!| = R|<local>/e|.R|java/lang/Throwable.getLocalizedMessage|()
}
public final fun test(e: R|kotlin/Exception|, stream: R|java/io/PrintStream|): R|kotlin/Unit| {
R|<local>/e|.R|java/lang/Throwable.printStackTrace|()
R|<local>/e|.R|java/lang/Throwable.printStackTrace|(R|<local>/stream|)
lval result: R|ft<@FlexibleNullability kotlin/String, kotlin/String?>!| = R|<local>/e|.R|java/lang/Throwable.getLocalizedMessage|()
lval result: R|ft<kotlin/String, kotlin/String?>!| = R|<local>/e|.R|java/lang/Throwable.getLocalizedMessage|()
}