IC: Fix regression in detecting constants in KotlinClassInfo.kt
A constant is a static final field with non-null value. In a previous
commit (0b09be7), we accidentally removed the *non-null value*
filter when looking for constants in the bytecode.
This commit re-adds that filter to make sure the detection is correct.
Test: Added KotlinOnlyClasspathChangesComputerTest.testDelegatedProperties
^KT-58986: Fixed
This commit is contained in:
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+15
@@ -0,0 +1,15 @@
|
||||
package com.example
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
var delegatedProperty: String by Delegate() // Added
|
||||
|
||||
class Delegate {
|
||||
|
||||
operator fun getValue(thisRef: Any?, property: KProperty<*>): String {
|
||||
return "<Delegated>"
|
||||
}
|
||||
|
||||
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: String) {
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.example
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
|
||||
operator fun getValue(thisRef: Any?, property: KProperty<*>): String {
|
||||
return "<Delegated>"
|
||||
}
|
||||
|
||||
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: String) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user