Added test for implicit receiver in class.

This commit is contained in:
Evgeny Gerashchenko
2015-06-17 13:13:44 +03:00
parent 154b0d8351
commit b068a1dd5f
2 changed files with 20 additions and 0 deletions
@@ -0,0 +1,12 @@
class A {
fun simple() {
}
fun Any.ext() {
simple()
}
fun Any.ext1() {
ext1()
}
}
@@ -31,4 +31,12 @@
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused receiver parameter</problem_class>
<description>Receiver parameter is never used</description>
</problem>
<problem>
<file>implicitReceiverInClass.kt</file>
<line>5</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/irrelevantCallInFunction.kt" />
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused receiver parameter</problem_class>
<description>Receiver parameter is never used</description>
</problem>
</problems>