-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 (cherry picked from commit 0783561)
- Loading branch information
1 parent
5964edc
commit de918fc
Showing
7 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.49 KB
...t/KotlinOnly/testDelegatedProperties/classes/current-classpath/com/example/Delegate.class
Binary file not shown.
Binary file added
BIN
+1.83 KB
...tlinOnly/testDelegatedProperties/classes/current-classpath/com/example/FileFacadeKt.class
Binary file not shown.
Binary file added
BIN
+1.49 KB
.../KotlinOnly/testDelegatedProperties/classes/previous-classpath/com/example/Delegate.class
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
...erTest/KotlinOnly/testDelegatedProperties/src/current-classpath/com/example/FileFacade.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 changes: 13 additions & 0 deletions
13
...rTest/KotlinOnly/testDelegatedProperties/src/previous-classpath/com/example/FileFacade.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) { | ||
} | ||
} |