KT-1936 codegen tests for issue which in fact frontend one
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
trait MyTrait
|
||||
{
|
||||
var property : String
|
||||
fun foo() = property
|
||||
}
|
||||
|
||||
open class B(param : String) : MyTrait
|
||||
{
|
||||
override var property : String = param
|
||||
override fun foo() = super.foo()
|
||||
}
|
||||
|
||||
fun box()= B("OK").foo()
|
||||
@@ -0,0 +1,15 @@
|
||||
open class MyClass(param : String) {
|
||||
var propterty = param
|
||||
}
|
||||
|
||||
trait MyTrait : MyClass
|
||||
{
|
||||
fun foo() = propterty
|
||||
}
|
||||
|
||||
open class B(param : String) : MyTrait, MyClass(param)
|
||||
{
|
||||
override fun foo() = super<MyTrait>.foo()
|
||||
}
|
||||
|
||||
fun box()= B("OK").foo()
|
||||
@@ -76,4 +76,12 @@ public class TraitsTest extends CodegenTestCase {
|
||||
public void testFinalMethod() throws Exception {
|
||||
blackBoxFile("traits/finalMethod.jet");
|
||||
}
|
||||
|
||||
public void testKt1936_1() throws Exception {
|
||||
blackBoxFile("regressions/kt1936_1.kt");
|
||||
}
|
||||
|
||||
public void testKt1936_2() throws Exception {
|
||||
blackBoxFile("regressions/kt1936_2.kt");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user