Support getValue/setValue/provideDelegate suspend functions in JVM backend
- Determine if there are non-tail calls to getValue/setValue simply by existance of such a property (it might be too strict, but implementing more granular check may be rather hard) - Change in ExpressionCodegen is relevant for provideDelegate, that in case of local variables uses OnStack as StackValue (see the comment near these changes) #KT-15933 Fixed
This commit is contained in:
+5
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.descriptors
|
||||
|
||||
import org.jetbrains.kotlin.utils.singletonOrEmptyList
|
||||
|
||||
interface VariableDescriptorWithAccessors : VariableDescriptor {
|
||||
val getter: VariableAccessorDescriptor?
|
||||
|
||||
@@ -31,3 +33,6 @@ interface VariableDescriptorWithAccessors : VariableDescriptor {
|
||||
@Deprecated("Do not call this method in the compiler front-end.")
|
||||
val isDelegated: Boolean
|
||||
}
|
||||
|
||||
val VariableDescriptorWithAccessors.accessors: List<VariableAccessorDescriptor>
|
||||
get() = getter.singletonOrEmptyList() + setter.singletonOrEmptyList()
|
||||
|
||||
Reference in New Issue
Block a user