[FIR] Don't create backing field for property without explicit type
#KT-41977 Fixed
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// ISSUE: KT-41977
|
||||
|
||||
class A {
|
||||
val field: String = "" // (1)
|
||||
|
||||
val x
|
||||
get() = field.length // should be ok, resolve to (1)
|
||||
}
|
||||
|
||||
class B {
|
||||
val field: String = ""
|
||||
|
||||
val x: Int
|
||||
get() = field.<!UNRESOLVED_REFERENCE!>length<!> // should be an error
|
||||
}
|
||||
Reference in New Issue
Block a user