Create From Usage: Add support of property delegates

This commit is contained in:
Alexey Sedunov
2014-10-08 17:46:19 +04:00
parent 2e6d4b3501
commit f0a0df94b5
13 changed files with 125 additions and 10 deletions
@@ -0,0 +1,11 @@
// "Create property 'foo' from usage" "true"
// ERROR: Property must be initialized or be abstract
// ERROR: Variable 'foo' must be initialized
import kotlin.properties.ReadOnlyProperty
class A<T> {
val <T> foo: ReadOnlyProperty<A<T>, A<Int>>
val x: A<Int> by foo
}
@@ -0,0 +1,11 @@
// "Create property 'foo' from usage" "true"
// ERROR: Property must be initialized or be abstract
// ERROR: Variable 'foo' must be initialized
import kotlin.properties.ReadWriteProperty
class A<T> {
val <T> foo: ReadWriteProperty<A<T>, A<Int>>
var x: A<Int> by foo
}
@@ -0,0 +1,7 @@
// "Create property 'foo' from usage" "true"
// ERROR: Property must be initialized or be abstract
// ERROR: Variable 'foo' must be initialized
class A<T> {
val x: A<Int> by <caret>foo
}
@@ -0,0 +1,7 @@
// "Create property 'foo' from usage" "true"
// ERROR: Property must be initialized or be abstract
// ERROR: Variable 'foo' must be initialized
class A<T> {
var x: A<Int> by <caret>foo
}