6f8682c950
- introduce a scoped counter instead of a global one for name
generation for accessors. Naive solution not working.
- Introduced hardcoded "jd" suffix for accessors on interfaces, under
the assumption that the only such accessors are due to JvmDefault
and their bridges from `$DefaultImpls`. Removed all associated
templated tests, so the old and IR backend correspond on this matter
again.
- Respecialized writeFlags from regexps to string-equality: we are
going for exact matches now!
- Fixed package calculation in `IrUtils.kt`.
- Accessors for static members must be due to accessing super
classes. Actual super-qualified calls are naturally also accessing
super classes. Hence the `$s+{hashcode(superClassName)}`
suffix. Added test to affirm this naming scheme.
- Field getters/setters for static fields must be companion accessors,
otherwise just labelled as accessors. They are also tagged with `s`
suffix when accessing static fields.
- For naming of accessors to coincide with the old backend, field
renaming to avoid JVM signature clashes must be done _after_
generation of accessors for those fields.
28 lines
606 B
Kotlin
Vendored
28 lines
606 B
Kotlin
Vendored
// !JVM_DEFAULT_MODE: compatibility
|
|
// JVM_TARGET: 1.8
|
|
// WITH_RUNTIME
|
|
|
|
interface Test {
|
|
@JvmDefault
|
|
val test: String
|
|
get() = "OK"
|
|
|
|
@JvmDefault
|
|
var test2: String
|
|
get() = "OK"
|
|
set(field) {}
|
|
}
|
|
|
|
// TESTED_OBJECT_KIND: function
|
|
// TESTED_OBJECTS: Test, access$getTest$jd
|
|
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC
|
|
|
|
// TESTED_OBJECT_KIND: function
|
|
// TESTED_OBJECTS: Test, access$getTest2$jd
|
|
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC
|
|
|
|
// TESTED_OBJECT_KIND: function
|
|
// TESTED_OBJECTS: Test, access$setTest2$jd
|
|
// FLAGS: ACC_PUBLIC, ACC_STATIC, ACC_SYNTHETIC
|
|
|