Delegated members should not be synthetic
Otherwise they are invisible to Java code
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class JavaClass {
|
||||
public static void main(String[] args) {
|
||||
Test test = new Test();
|
||||
test.foo();
|
||||
test.getBar();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
trait Trait {
|
||||
fun foo()
|
||||
val bar: Int
|
||||
}
|
||||
|
||||
class Impl: Trait {
|
||||
override fun foo() {}
|
||||
override val bar = 1
|
||||
}
|
||||
|
||||
class Test : Trait by Impl()
|
||||
Reference in New Issue
Block a user