Commit Graph

18 Commits

Author SHA1 Message Date
Igor Chevdar
9e17140daf [JS_IR] Turned on passing JS_IR tests 2019-12-24 15:54:45 +03:00
Mark Punzalan
5afab1ac2b [FIR] FIR2IR: Populate calls with type arguments and function type
parameters with bounds/supertypes.
2019-11-25 09:37:47 +03:00
Pavel Kirpichenkov
8c103629a6 Disable FIR box test for callable references to vararg function 2019-11-22 18:22:04 +03:00
Pavel Kirpichenkov
f80a71517f [NI] Handle vararg parameter in reflection type wrt array types
Vararg parameter in reflection type is interpreted as covariant
array type against array in expected functional type and as
vararg element type otherwise. For instance having function
fun foo(vararg args: Int): Unit { /*...*/ }
reference ::foo can be passed against expected
(Int) -> Unit,
(Int, Int) -> Unit, etc.
In none of such cases type for parameter in foo's reflection type
should be changed to array.
However, against expected type (IntArray) -> Unit args' type
must become IntArray.

^KT-25514 Fixed
2019-11-21 20:07:14 +03:00
Mark Punzalan
9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Kristoffer Andersen
1074a0ef69 JVM_IR: Fix Inline CallableReferences with Varargs
- Added tests to demonstrate broken behaviour: the interaction of inline
  functions and callable references with varargs and defaults in various
  combinations.
- Refactored InlineCallableReferencesToLambdaPhase to look like and use
  some of the infrastructure from CallableReferenceLowering.
- Lifted some of this infrastructure out to be broadly reusable.
2019-10-31 08:15:22 +01:00
Igor Chevdar
ad8bcda99e [IR] Merged K/N inliner with the common one 2019-08-16 18:32:19 +03:00
Mikhail Zarechenskiy
04e57f712e [NI] Introduce feature for passing function references with defaults
Relates to KT-8834, we continue reducing differences between old and new
 inference. Note that as for `SamConversionPerArgument`, this feature
 is enabled in the compiler and not in the IDE to avoid breaking code
 for those users that already enabled new inference in the compiler
2019-08-07 15:58:36 +03:00
Mark Punzalan
1abdf0561a Generate synthetic functions for local functions with default values, by
re-ordering the lowering phases.

The changes in InterfaceLowering are necessary so that IrElements that
target the removed functions are re-targeted to the new functions in
DefaultImpls. This affects local functions in interface functions since
now LocalDeclarationsLowering comes before InterfaceLowering.
2019-07-01 13:24:08 +02:00
pyos
8cca74c932 JVM_IR: support vararg & defaults in function references 2019-06-20 22:37:56 +03:00
Roman Artemev
1f98eaa27b [JS IR BE] Fix Callable reference with vararg
* Update tests
2019-03-15 19:21:38 +03:00
Dmitry Petrov
e1fdf0aa43 KT-29959 fix IR generation for 'd.m = e' 2019-02-19 09:59:42 +03:00
Dmitry Petrov
740d5ec468 Mute some tests in JS_IR after adding basic dynamic expressions support 2019-02-14 16:03:11 +03:00
Roman Artemev
7f215d3f52 Update tests 2018-11-01 16:51:38 +03:00
Anton Bannykh
2e709a81fa [JS IR BE] Arrays, varargs 2018-09-18 14:36:20 +03:00
Mikhael Bogdanov
357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Alexander Udalov
0c8b231fde Add tests on coercion to Unit for callable references
#KT-11723
2018-08-01 16:26:07 +02:00
Alexander Udalov
9babd90999 Support default arguments and varargs for callable references
#KT-8834
 #KT-19869
 #KT-25514
2018-08-01 16:26:06 +02:00