Fix "Descriptor of property not available in binding context" assert for declarations in bodies

This commit is contained in:
Nikolay Krasko
2013-08-01 15:00:52 +04:00
parent a4f452a943
commit 26f14a67ee
4 changed files with 32 additions and 2 deletions
@@ -0,0 +1,13 @@
// "Change 'prop' type to 'Int'" "true"
// ERROR: Null can not be a value of a non-null type Int
trait Test<T> {
val prop : T
}
class Other {
fun doTest() {
val some = object: Test<Int> {
override val prop: Int = null
}
}
}
@@ -0,0 +1,13 @@
// "Change 'prop' type to 'Int'" "true"
// ERROR: Null can not be a value of a non-null type Int
trait Test<T> {
val prop : T
}
class Other {
fun doTest() {
val some = object: Test<Int> {
override val <caret>prop = null
}
}
}