Support :: references to properties in frontend
#KT-1183 In Progress
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
var x: Int = 42
|
||||
val y: String get() = "y"
|
||||
|
||||
fun testX() {
|
||||
val xx = ::x
|
||||
xx : KMutableTopLevelProperty<Int>
|
||||
xx : KTopLevelProperty<Int>
|
||||
xx : KMutableProperty<Int>
|
||||
xx : KProperty<Int>
|
||||
xx : KCallable<Int>
|
||||
|
||||
xx.name : String
|
||||
xx.get() : Int
|
||||
xx.set(239)
|
||||
}
|
||||
|
||||
fun testY() {
|
||||
val yy = ::y
|
||||
<!TYPE_MISMATCH!>yy<!> : KMutableTopLevelProperty<String>
|
||||
yy : KTopLevelProperty<String>
|
||||
<!TYPE_MISMATCH!>yy<!> : KMutableProperty<String>
|
||||
yy : KProperty<String>
|
||||
yy : KCallable<String>
|
||||
|
||||
yy.name : String
|
||||
yy.get() : String
|
||||
yy.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>set<!>("yy")
|
||||
}
|
||||
Reference in New Issue
Block a user