[java] correct receiver parameter type check (IDEA-175906)

This commit is contained in:
Roman Shevchenko
2017-07-17 15:10:13 +02:00
parent 9a855129dc
commit c87ce5bb69
2 changed files with 19 additions and 10 deletions

View File

@@ -49,4 +49,10 @@ class C {
B(C <error descr="The receiver name does not match the enclosing class type">B.this</error>, long p) { }
B(C <error descr="The receiver name does not match the enclosing class type">this</error>, float p) { }
}
}
static class CI<T> {
void m1(CI<T> this) { }
<T> void m2(<error descr="The receiver type does not match the enclosing class type">CI<T></error> this) { }
void m3(<error descr="The receiver type does not match the enclosing class type">CI<String></error> this) { }
}
}