KT-2193 Nullability information lost for functions inherited from traits
#KT-2193 fixed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
//KT-2206
|
||||
trait A {
|
||||
fun f():Int = 239
|
||||
}
|
||||
|
||||
class B() : A
|
||||
|
||||
fun box() : String {
|
||||
return if (B().f() == 239) "OK" else "fail"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
//KT-2206
|
||||
|
||||
trait A {
|
||||
var a:Int
|
||||
get() = 239
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
|
||||
class B() : A
|
||||
|
||||
fun box() : String {
|
||||
return if (B().a == 239) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user