Add more tests for PropertyAccessorDescriptor.isDeafult() usages

This commit is contained in:
Nikolay Krasko
2016-06-18 21:47:38 +03:00
committed by Nikolay Krasko
parent c936b3f3e0
commit eee45e91ce
21 changed files with 184 additions and 0 deletions
+12
View File
@@ -266,3 +266,15 @@ fun inForLoop(x: Any?) {
}
for (i in <error descr="[ITERATOR_MISSING] For-loop range must have an 'iterator()' method">x</error>) {}
}
class ExplicitAccessorForAnnotation {
val tt: String? = "good"
<info descr="null">get</info>
fun foo(): String {
if (tt is String) {
return <error descr="[SMARTCAST_IMPOSSIBLE] Smart cast to 'String' is impossible, because 'tt' is a property that has open or custom getter">tt</error>
}
return ""
}
}