Create From Usage: Fix ClassCastException on local property with delegate

#EA-69707 Fixed
This commit is contained in:
Alexey Sedunov
2015-08-18 19:38:46 +03:00
parent 85f85e85b4
commit d48851ba63
5 changed files with 32 additions and 18 deletions
@@ -0,0 +1,7 @@
// "Create property 'foo'" "true"
// ERROR: Local variables are not allowed to have delegates
// ERROR: Property must be initialized
fun test() {
val x: Int by <caret>foo
}
@@ -0,0 +1,11 @@
import kotlin.properties.ReadOnlyProperty
// "Create property 'foo'" "true"
// ERROR: Local variables are not allowed to have delegates
// ERROR: Property must be initialized
val foo: ReadOnlyProperty<Nothing?, Int>
fun test() {
val x: Int by foo
}