Improve heuristic to decide whether we will generate DefaultImpls for interface

This is not accurate, there are some cases when we will generate DefaultImpls class that are not covered:
- Inherited default implementations
- Annotated members

In these cases IDE will report an error when in fact code compiles
What is critical though is to be able to decide whether to build DefaultImpls light classes solely based on psi without triggering stubs calculation
This commit is contained in:
Pavel V. Talanov
2015-11-09 19:17:28 +03:00
parent ad87ec12cd
commit bff7ff0c5d
5 changed files with 67 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
import lib.*;
class C {
public static void test(NonAbstractFun i, NonAbstractFunWithExpressionBody i2, NonAbstractProperty i3, NonAbstractPropertyWithBody i4) {
AllAbstract.<error descr="Cannot resolve symbol 'DefaultImpls'">DefaultImpls</error>;
NonAbstractFun.DefaultImpls.f(i);
NonAbstractFunWithExpressionBody.DefaultImpls.f(i2);
NonAbstractProperty.DefaultImpls.getC(i3);
NonAbstractPropertyWithBody.DefaultImpls.getC(i4);
}
}