KT-2193 Nullability information lost for functions inherited from traits

#KT-2193 fixed
This commit is contained in:
Evgeny Gerashchenko
2012-06-08 21:49:31 +04:00
parent 208dd4e35d
commit 64d1d3eda6
5 changed files with 64 additions and 3 deletions
@@ -0,0 +1,9 @@
package test
// test composed from KT-2193
trait A {
open fun f(): String = "test"
}
class B() : A
@@ -0,0 +1,9 @@
namespace test
abstract trait test.A : jet.Any {
open fun f(): jet.String
}
final class test.B : test.A {
final /*constructor*/ fun <init>(): test.B
open override /*1*/ fun f(): jet.String
}
@@ -0,0 +1,13 @@
package test
// test composed from KT-2193
trait A {
open var v: String
get() = "test"
set(value) {
throw UnsupportedOperationException()
}
}
class B() : A
@@ -0,0 +1,9 @@
namespace test
abstract trait test.A : jet.Any {
open var v: jet.String
}
final class test.B : test.A {
final /*constructor*/ fun <init>(): test.B
open var v: jet.String
}