Generate bridges for properties declared in constructor
#KT-2926 Fixed #KT-2833 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
trait A<T> {
|
||||
var x: T
|
||||
}
|
||||
|
||||
class B(override var x: String) : A<String>
|
||||
|
||||
fun box(): String {
|
||||
val a: A<String> = B("Fail")
|
||||
a.x = "OK"
|
||||
return a.x
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package test
|
||||
|
||||
public trait FunDependencyEdge {
|
||||
val from: FunctionNode
|
||||
}
|
||||
|
||||
public trait FunctionNode
|
||||
|
||||
public class FunctionNodeImpl : FunctionNode
|
||||
|
||||
class FunDependencyEdgeImpl(override val from: FunctionNodeImpl): FunDependencyEdge {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
(FunDependencyEdgeImpl(FunctionNodeImpl()) as FunDependencyEdge).from
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user