Check presence of dispatch receiver parameter in modifier checks

Also fix typo in "inapplicable infix" diagnostic message
This commit is contained in:
Alexander Udalov
2016-07-21 15:00:31 +03:00
parent 2a390155a9
commit 9be219b69c
8 changed files with 16 additions and 23 deletions
@@ -14,11 +14,11 @@ class OkTest {
<!INAPPLICABLE_INFIX_MODIFIER(must have a single value parameter)!>infix<!> fun String.e1(o: String, o2: String? = null) = o
<!INAPPLICABLE_INFIX_MODIFIER(must have a single value parameter)!>infix<!> fun String.e2(o: String = "", o2: String? = null) = o
<!INAPPLICABLE_INFIX_MODIFIER(must be a member of an extension function)!>infix<!> fun e3() {}
<!INAPPLICABLE_INFIX_MODIFIER(must be a member of an extension function)!>infix<!> fun e4(s: String) {}
<!INAPPLICABLE_INFIX_MODIFIER(must be a member or an extension function)!>infix<!> fun e3() {}
<!INAPPLICABLE_INFIX_MODIFIER(must be a member or an extension function)!>infix<!> fun e4(s: String) {}
<!INAPPLICABLE_INFIX_MODIFIER(must have a single value parameter)!>infix<!> fun String.e5() {}
<!INAPPLICABLE_INFIX_MODIFIER(must have a single value parameter)!>infix<!> fun String.e6(a: Int, b: Int) {}
<!INAPPLICABLE_INFIX_MODIFIER(must be a member of an extension function)!>infix<!> fun e7(a: Int, b: Int) {}
<!INAPPLICABLE_INFIX_MODIFIER(must be a member or an extension function)!>infix<!> fun e7(a: Int, b: Int) {}
class Example {
<!INAPPLICABLE_INFIX_MODIFIER(must have a single value parameter)!>infix<!> fun e8(s: String, a: Int = 0) {}