Add diagnostics for get/set methods of property delegate

This commit is contained in:
Natalia.Ukhorskaya
2013-04-16 15:41:25 +04:00
parent c58d4fd6d2
commit a9b4a342e7
24 changed files with 410 additions and 7 deletions
@@ -0,0 +1,17 @@
class A {
var a: Int by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>Delegate()<!>
}
var aTopLevel: Int by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>Delegate()<!>
class Delegate {
fun get(t: Any?, p: String): Int {
t.equals(p) // to avoid UNUSED_PARAMETER warning
return 1
}
fun set(t: Any?, p: String, a: Int, c: Int) {
t.equals(p) // to avoid UNUSED_PARAMETER warning
c.equals(a)
}
}