Simplify compatibility mode with ll=1.0 on JDK dependent built-ins

A lot of problem arise with current solution
(loading them with lowpriority annotation + additional call checkers):
- We errorneously treated ArrayList.stream as an existing method, while
  it's just a fake override from List
- The same problem arises when creating a class delegating to List.
  Also the latter case is failing with codegen internal error
  (see issue KT-16171)

The negative side of this solution is that instead of reporting meaningful
diagnostic, there will be UNRESOLVED_REFERENCE.
But it seems to be better than having strange problems like ones described above.

 #KT-16073 Fixed
 #KT-16171 Fixed
This commit is contained in:
Denis Zharkov
2017-02-07 18:59:25 +03:00
parent d84c303029
commit 1bb40afada
7 changed files with 58 additions and 120 deletions
@@ -120,6 +120,12 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg
doTest(fileName);
}
@TestMetadata("streamBackwardCompatibility.kt")
public void testStreamBackwardCompatibility() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/streamBackwardCompatibility.kt");
doTest(fileName);
}
@TestMetadata("useStream.kt")
public void testUseStream() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/useStream.kt");