[FIR] Don't create backing field for property without explicit type

#KT-41977 Fixed
This commit is contained in:
Dmitriy Novozhilov
2020-09-29 10:09:07 +03:00
parent 0c0a8f9849
commit fb871a55a3
8 changed files with 59 additions and 5 deletions
@@ -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
}