Generate bridges for properties declared in constructor

#KT-2926 Fixed
 #KT-2833 Fixed
This commit is contained in:
Alexander Udalov
2012-10-10 20:24:31 +04:00
parent 5bc9291d61
commit 8bfb2ddcce
5 changed files with 55 additions and 17 deletions
@@ -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"
}