Create From Usage: Fix ClassCastException on local property with delegate
#EA-69707 Fixed
This commit is contained in:
+7
@@ -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
|
||||
}
|
||||
Vendored
+11
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user