Commit Graph

32 Commits

Author SHA1 Message Date
Dmitry Petrov
d27593aeda PSI2IR: SAM conversion in method arguments of out-projected Java classes
It uses the same logic as an old back-end
(see SamType#createByValueParameter and genericSamProjectedOut.kt),
split into two parts:

1. When inserting SAM casts, use SamType#createByValueParamerer to get
the target SAM type.

2. When inserting implicit casts, cast SAM conversions as arguments of
methods of out-projected types to the original type of value parameter
instead of 'Nothing'.
2020-01-03 15:32:44 +03:00
Georgy Bronnikov
cd78e6ec50 JVM_IR: handle property references in SAM conversions 2019-10-29 18:38:59 +03:00
Dmitry Petrov
986654b709 psi2ir: fix unsubstituted type parameters around SAM conversions
Preserve type substitution:
- when obtaining function type for SAM type;
- when generating SAM conversions for SAM adapter arguments;
- for "original" method corresponding to a SAM adapter.
2019-08-14 14:18:42 +03:00
pyos
b74586f84e JVM_IR: implement single-abstract-method conversions 2019-04-04 09:45:00 +02:00
Alexander Udalov
cb7727d51a Add explicit WITH_RUNTIME to boxAgainstJava tests which need stdlib 2019-03-28 14:26:10 +01:00
Mikhael Bogdanov
a4206a543a Skip test on JDK 6 2018-10-22 16:32:55 +02:00
Alexander Udalov
712c9cbfe6 Minor, mute legacyModOperator.kt for JVM_IR 2018-10-01 16:17:14 +02:00
Dmitry Savvinov
f23528770b Extract usages of legacy 'mod' in a separate test 2018-08-30 16:24:27 +03:00
Alexander Udalov
76214930da Update generic signatures in codegen test data
The implementation of toString for generic types in Java reflection has
been changed in 8u162 (https://bugs.openjdk.java.net/browse/JDK-8054213)
2018-08-10 18:20:05 +02:00
Mikhael Bogdanov
34a12cb87c Mute 'boxAgainstJava' tests 2018-08-02 13:19:27 +02:00
Dmitry Petrov
0db6e5c3f3 Fix SAM wrapper generation in secondary constructor calls
Should simply invoke 'checkSamCall' in corresponding visitor method to
check if call arguments should be wrapped.
2017-12-04 10:29:33 +03:00
Denis Zharkov
1511a03027 Fix SAM adapters substitution
Approximate sourceFunction types if it's needed

 #KT-11696 Fixed
2016-03-31 14:52:12 +03:00
Michael Bogdanov
6737bc12f1 Fix for KT-11519: Version 1.0.1 fails with NPE in com.sun.beans.TypeResolver.resolve() where v1.0.0 works fine
#KT-11519 Fixed
2016-03-24 15:18:31 +01:00
Alexander Udalov
65662d7c99 Remove incorrect test, to be reconsidered in the future
Before 3ca4097, 'set' signature was not checked at all in this case

 #KT-11272 Open
2016-03-02 20:44:23 +03:00
Alexander Udalov
280ad195ee Migrate boxAgainstJava tests to multi-file framework 2016-03-02 15:47:36 +03:00
Ilya Gorbunov
25c4453dc5 Cleanup deprecated symbol usages in testData 2016-01-22 05:54:38 +03:00
Yan Zhulanow
9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Mikhail Glukhikh
4e44466cf9 Exposed visibility deprecation warnings made errors + relevant test fixes 2015-11-20 15:21:01 +03:00
Dmitry Jemerov
1523d5bcbf removing static type assertions work in progress 2015-10-12 11:11:23 +02:00
Valentin Kipyatkov
9150c53832 Fixed codegen for non-public SAM-adapters 2015-08-04 18:05:57 +03:00
Alexander Udalov
290983687d Fix generation of bridges for lambdas
#KT-8447 Fixed
2015-07-10 20:10:16 +03:00
Alexander Udalov
f81c364999 Add test cases for obsolete issues
#KT-3407 Obsolete
 #KT-4753 Obsolete
2015-06-17 16:23:55 +03:00
Alexander Udalov
4141e0a8df Introduce fictitious numbered Function class descriptors 2015-05-26 15:04:54 +03:00
Stanislav Erokhin
3de0dff575 Migrate testdata to new lambda syntax 2015-04-07 13:08:53 +03:00
Dmitry Jemerov
827d9d48c1 Correctly apply SAM conversions in superclass constructor calls
#KT-5452 Fixed
2015-03-26 19:03:42 +01:00
Alexander Udalov
a7b88e9485 Make CharSequence.length a function instead of property
And String.length as well.

This is done for JVM interoperability: java.lang.CharSequence is an open class
and has a function 'length()' which should be implemented in subclasses
somehow.

A minor unexpected effect of this is that String.length() is now a compile-time
constant (it wasn't such as a property because properties are not supported in
compile-time constant evaluation)

 #KT-3571 Fixed
2014-11-27 20:38:17 +03:00
Evgeny Gerashchenko
b80f82dffd Fixed filename case. 2014-10-07 20:57:05 +04:00
Evgeny Gerashchenko
b062548392 Expanded and simplified test for generating bridges in sam conversions. 2014-10-07 17:48:17 +04:00
Michael Bogdanov
6bcb2e9001 Temporary fix for KT-5912
#KT-5912 Fixed
2014-10-07 17:48:17 +04:00
Denis Zharkov
c4746bc90f Assignment operations test fix:
these methods used in expressions like a = a + b, so they need to return
NotNull when receiver is NotNull
2014-07-28 22:00:15 +04:00
Alexander Udalov
a79398fa00 Don't load Object as a supertype for Java classes
#KT-4890 In Progress
 #KT-5002 Fixed
2014-07-25 21:19:37 +04:00
Alexander Udalov
09863445bb Rename tests: boxWithJava -> boxAgainstJava 2014-06-26 20:57:40 +04:00