Return type of local delegated property setter should be Unit
#KT-17950 Fixed
This commit is contained in:
@@ -35,33 +35,31 @@ FILE /localDelegatedProperties.kt
|
||||
<V>: Int
|
||||
$receiver: GET_VAR '`x$delegate`: HashMap<String, Int> /* = HashMap<String, Int> */' type=kotlin.collections.HashMap<kotlin.String, kotlin.Int> /* = java.util.HashMap<kotlin.String, kotlin.Int> */ origin=null
|
||||
thisRef: CONST Null type=kotlin.Nothing? value='null'
|
||||
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'x: Int' delegate='`x$delegate`: HashMap<String, Int> /* = HashMap<String, Int> */' getter='<get-x>(): Int' setter='<set-x>(Int): Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR local final fun <set-x>(value: kotlin.Int): kotlin.Int
|
||||
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'x: Int' delegate='`x$delegate`: HashMap<String, Int> /* = HashMap<String, Int> */' getter='<get-x>(): Int' setter='<set-x>(Int): Unit' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR local final fun <set-x>(value: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<set-x>(Int): Int'
|
||||
TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
|
||||
CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit origin=null
|
||||
<V>: Int
|
||||
$receiver: GET_VAR '`x$delegate`: HashMap<String, Int> /* = HashMap<String, Int> */' type=kotlin.collections.HashMap<kotlin.String, kotlin.Int> /* = java.util.HashMap<kotlin.String, kotlin.Int> */ origin=null
|
||||
thisRef: CONST Null type=kotlin.Nothing? value='null'
|
||||
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'x: Int' delegate='`x$delegate`: HashMap<String, Int> /* = HashMap<String, Int> */' getter='<get-x>(): Int' setter='<set-x>(Int): Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
|
||||
RETURN type=kotlin.Nothing from='<set-x>(Int): Unit'
|
||||
CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit origin=null
|
||||
<V>: Int
|
||||
$receiver: GET_VAR '`x$delegate`: HashMap<String, Int> /* = HashMap<String, Int> */' type=kotlin.collections.HashMap<kotlin.String, kotlin.Int> /* = java.util.HashMap<kotlin.String, kotlin.Int> */ origin=null
|
||||
thisRef: CONST Null type=kotlin.Nothing? value='null'
|
||||
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'x: Int' delegate='`x$delegate`: HashMap<String, Int> /* = HashMap<String, Int> */' getter='<get-x>(): Int' setter='<set-x>(Int): Unit' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL '<set-x>(Int): Int' type=kotlin.Int origin=EQ
|
||||
CALL '<set-x>(Int): Unit' type=kotlin.Int origin=EQ
|
||||
value: CONST Int type=kotlin.Int value='0'
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
BLOCK type=kotlin.Int origin=POSTFIX_INCR
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int
|
||||
CALL '<get-x>(): Int' type=kotlin.Int origin=POSTFIX_INCR
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL '<set-x>(Int): Int' type=kotlin.Int origin=POSTFIX_INCR
|
||||
CALL '<set-x>(Int): Unit' type=kotlin.Int origin=POSTFIX_INCR
|
||||
value: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
|
||||
$this: GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
|
||||
GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL '<set-x>(Int): Int' type=kotlin.Int origin=PLUSEQ
|
||||
CALL '<set-x>(Int): Unit' type=kotlin.Int origin=PLUSEQ
|
||||
value: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
|
||||
$this: CALL '<get-x>(): Int' type=kotlin.Int origin=PLUSEQ
|
||||
other: CONST Int type=kotlin.Int value='1'
|
||||
|
||||
|
||||
+9
-10
@@ -97,21 +97,20 @@ FILE /localDelegatedPropertyWithSuspendOperators.kt
|
||||
CALL 'provideDelegate(Any?, Any): A' type=A origin=null
|
||||
$this: CALL 'constructor A()' type=A origin=null
|
||||
host: CONST Null type=kotlin.Nothing? value='null'
|
||||
p: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testVar: Int' delegate='`testVar$delegate`: A' getter='<get-testVar>(): Int' setter='<set-testVar>(Int): Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
p: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testVar: Int' delegate='`testVar$delegate`: A' getter='<get-testVar>(): Int' setter='<set-testVar>(Int): Unit' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR local final suspend fun <get-testVar>(): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testVar>(): Int'
|
||||
CALL 'getValue(Any?, KProperty<*>): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR '`testVar$delegate`: A' type=A origin=null
|
||||
thisRef: CONST Null type=kotlin.Nothing? value='null'
|
||||
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testVar: Int' delegate='`testVar$delegate`: A' getter='<get-testVar>(): Int' setter='<set-testVar>(Int): Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR local final suspend fun <set-testVar>(value: kotlin.Int): kotlin.Int
|
||||
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testVar: Int' delegate='`testVar$delegate`: A' getter='<get-testVar>(): Int' setter='<set-testVar>(Int): Unit' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR local final suspend fun <set-testVar>(value: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<set-testVar>(Int): Int'
|
||||
TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
|
||||
CALL 'setValue(Any?, KProperty<*>, Int): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '`testVar$delegate`: A' type=A origin=null
|
||||
thisRef: CONST Null type=kotlin.Nothing? value='null'
|
||||
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testVar: Int' delegate='`testVar$delegate`: A' getter='<get-testVar>(): Int' setter='<set-testVar>(Int): Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
|
||||
RETURN type=kotlin.Nothing from='<set-testVar>(Int): Unit'
|
||||
CALL 'setValue(Any?, KProperty<*>, Int): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '`testVar$delegate`: A' type=A origin=null
|
||||
thisRef: CONST Null type=kotlin.Nothing? value='null'
|
||||
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testVar: Int' delegate='`testVar$delegate`: A' getter='<get-testVar>(): Int' setter='<set-testVar>(Int): Unit' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
|
||||
|
||||
Reference in New Issue
Block a user