[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:
+7
-6
@@ -12,18 +12,19 @@ fun test1() {
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
var x: Int?
|
||||
var x: @FlexibleNullability Int?
|
||||
val x$delegate: HashMap<String, Int> = hashMapOf<String, Int>()
|
||||
local get(): Int? {
|
||||
return x$delegate.getValue<Int?, Int?>(thisRef = null, property = ::x)
|
||||
local get(): @FlexibleNullability Int? {
|
||||
return x$delegate.getValue<@FlexibleNullability Int?, @FlexibleNullability Int?>(thisRef = null, property = ::x)
|
||||
}
|
||||
local set(<set-?>: Int?) {
|
||||
x$delegate.setValue<Int?>(thisRef = null, property = ::x, value = <set-?>)
|
||||
local set(<set-?>: @FlexibleNullability Int?) {
|
||||
x$delegate.setValue<@FlexibleNullability Int?>(thisRef = null, property = ::x, value = <set-?>)
|
||||
}
|
||||
|
||||
<set-x>(<set-?> = 0)
|
||||
val <unary>: Int? = <get-x>()
|
||||
val <unary>: @FlexibleNullability Int? = <get-x>()
|
||||
<set-x>(<set-?> = <unary>.inc())
|
||||
<unary> /*~> Unit */
|
||||
<set-x>(<set-?> = <get-x>().plus(other = 1))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user