Create From Usage: Do not suggest "val" for references used as assignment left-hand side
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// "Create property 'foo' from usage" "true"
|
||||
// ERROR: Property must be initialized
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
fun test() {
|
||||
2.foo = A("2")
|
||||
}
|
||||
|
||||
var Int.foo: A<String>
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Create property 'foo' from usage" "true"
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
|
||||
class A<T>(val n: T) {
|
||||
var foo: String
|
||||
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A(1).foo = "1"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create property 'foo' from usage" "true"
|
||||
// ERROR: Property must be initialized
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
fun test() {
|
||||
2.<caret>foo = A("2")
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create property 'foo' from usage" "true"
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
fun test() {
|
||||
A(1).<caret>foo = "1"
|
||||
}
|
||||
Reference in New Issue
Block a user