Create From Usage: Add support of property delegates
This commit is contained in:
+11
@@ -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
|
||||
}
|
||||
+11
@@ -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
|
||||
}
|
||||
+7
@@ -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
|
||||
}
|
||||
+7
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user