Fix synthetic method generation for extension properties
If several annotated extension properties with the same name were declared in one class, JVM issued a ClassFormatError, since we generated a synthetic method for each of them with the same name and signature. Make the signature of this synthetic method depend on a receiver parameter, if a property has one
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
annotation class Anno
|
||||
|
||||
[Anno] val Int.foo: Int
|
||||
get() = this
|
||||
|
||||
[Anno] val String.foo: Int
|
||||
get() = 42
|
||||
|
||||
fun box() = if (42.foo == 42 && "OK".foo == 42) "OK" else "Fail"
|
||||
Reference in New Issue
Block a user