KT-12152 : constructor consistency: distinguish properties with and w/o backing fields, with default / custom accessors

This commit is contained in:
Mikhail Glukhikh
2015-08-12 14:58:06 +03:00
parent 422ea4c6cb
commit be40cf8138
10 changed files with 148 additions and 18 deletions
@@ -9,16 +9,16 @@ class CustomDelegate {
class Kaboom() {
// Here and below we should have errors for simple AND delegated
init {
<!UNINITIALIZED_VARIABLE!>delegated<!>.hashCode()
<!UNINITIALIZED_VARIABLE, DEBUG_INFO_LEAKING_THIS!>delegated<!>.hashCode()
<!UNINITIALIZED_VARIABLE!>simple<!>.hashCode()
withGetter.hashCode()
<!DEBUG_INFO_LEAKING_THIS!>withGetter<!>.hashCode()
}
val other = <!UNINITIALIZED_VARIABLE!>delegated<!>
val other = <!UNINITIALIZED_VARIABLE, DEBUG_INFO_LEAKING_THIS!>delegated<!>
val another = <!UNINITIALIZED_VARIABLE!>simple<!>
val something = withGetter
val something = <!DEBUG_INFO_LEAKING_THIS!>withGetter<!>
val delegated: String by CustomDelegate()
@@ -28,5 +28,5 @@ class Kaboom() {
get() = "abc"
// No error should be here
val after = delegated
val after = <!DEBUG_INFO_LEAKING_THIS!>delegated<!>
}