Commit Graph

34 Commits

Author SHA1 Message Date
Ilya Gorbunov 568d4b11af Use 'run' function instead of 'synchronized' in KT-51036 test
It should be enough to reproduce the issue and makes the test runnable on all backends
2023-05-04 02:44:26 +00:00
Ilya Gorbunov f260b55810 Raise deprecation of js synchronized {} to error 2023-04-26 10:44:52 +00:00
Nikolay Lunyak be5850112a [FIR] KT-56723: Ensure safe access over non-expressions is always Unit
^KT-56723 Fixed
2023-02-27 15:00:30 +00:00
Steven Schäfer 7d59c7689c JVM IR: Avoid direct invokes in callable reference tests
Due to the direct invoke optimization, most callable reference tests
were not generating callable references/lambdas.
2022-07-14 23:24:18 +02:00
Pavel Punegov f819a10968 [K/N][test] Ignore test with synchronized java keyword 2022-02-01 11:46:35 +03:00
Dmitry Petrov beb4cf3d99 PSI2IR KT-51036 fix lambda return value generation 2022-01-31 12:18:19 +00:00
Xin Wang 56e5db9f0e JVM_IR KT-50074 generate tableswitch for literal string subject of when expression 2022-01-19 22:25:49 +03:00
Igor Laevsky a246ec636e WASM: Stupidify unit handling
Now every IR instruction returns an actual Unit instance.
All Unit's are actual objects passed around except for function boundaries.
2021-09-08 19:56:29 +03:00
Svyatoslav Kuzmich b79719d6f5 [Wasm] Fix unit issues
- Materialize unit when its value is actually needed.
- Special-case Unit_getInstance return type at codegen. It should be a
  proper Unit object instead of a "void"
2021-09-08 19:56:26 +03:00
Svyatoslav Kuzmich fdd7fa5aea [Wasm] Mute codegen box tests 2020-11-09 16:04:43 +03:00
Mikhail Glukhikh ca22e05acd [FIR2IR] Support safe calls 2020-03-23 15:13:50 +03:00
Juan Chen 7249d2f889 [FIR] Fix translation of invokes & add return expressions for lambdas
* fixed NoSuchMethod caused by mismatched signatures of the "invoke" method generated for lambda arguments
* added test cases in invoke.kt for KFunction and anonymous functions
* added a transformer to wrap the last expression in the bodies of lambdas with return
2020-02-06 12:44:14 +03:00
Juan Chen 573188bdc4 [FIR2IR]: fix translation of this references in instance methods
Currently FirThisReceiverExpression of instance methods are translated
to references of the class' thisReceiver,
not the method's dispatch receiver,
which causes problems with IrFrameMap::typeOf,
as the class' thisReceiver is not in the typeMap.

This commit translates non-qualified "this" references of
instance methods to references of the methods' dispatch receiver.
2020-01-10 10:43:07 +03:00
Roman Artemev 9946feb66c [JS IR] Fix name clash between class members defined on prototype
- Fixes [KT-33327]
2019-11-25 20:22:03 +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
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Svyatoslav Kuzmich 0b19a4a32b [JS IR BE] Initial version of member namer 2019-06-21 17:02:01 +03:00
Mikhael Bogdanov 494828f4cf Unmute jvm ir-tests 2018-08-15 10:26:28 +03:00
Mikhael Bogdanov 357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Alexey Andreev 37fa45dc34 Add mechanism for type coercion in JS
Use it for char boxing/unboxing and unit materialization.
Possible to use for other purposes, for example, to add type checks
to dynamics.

See KT-18793, KT-17915, KT-19081, KT-18216, KT-12970, KT-17014,
KT-13932, KT-13930
2017-09-11 14:34:34 +03:00
Zalim Bashorov 596f3364c6 Automatically mute failed tests 2016-11-09 21:41:12 +03:00
Yan Zhulanow a3ff3ffc45 Fix tests: "Placing function type parameters after the function name" error 2015-11-27 15:51:11 +03:00
Yan Zhulanow e14c9645dc Error on 'if' without an 'else' branch when used as an expression 2015-10-19 03:56:15 +03:00
Dmitry Jemerov 1523d5bcbf removing static type assertions work in progress 2015-10-12 11:11:23 +02:00
Michael Bogdanov ad6afee53f Fix for KT-6196: ClassCastException on unit property initializer
#KT-6196 Fixed
2014-11-05 18:25:36 +03:00
Zalim Bashorov c767ffc3e7 Unit.VALUE -> Unit in testData 2014-07-25 17:16:40 +04:00
Alexander Udalov 0576851102 Fix codegen for closures returning 'Unit?'
Only do a checkcast when we need to coerce Object to Unit: the code was
hopefully type-checked so that it'll only be necessary when the value is either
Unit.VALUE or null
2013-12-12 21:38:20 +04:00
Alexander Udalov 00da5fe1fb Fix VerifyError for 'when' of type 'Unit?' 2013-12-11 07:40:19 +04:00
Alexander Udalov 0d9c126485 Add regression test for KT-3634
#KT-3634 Obsolete
2013-12-11 07:40:19 +04:00
Alexander Udalov 6276dd1483 Return Unit.VALUE if Unit or Any is expected
StackValue.coerce will do its job in casting void to Unit correctly

 #KT-4212 Fixed
2013-12-09 17:57:59 +04:00
Alexander Udalov f19ede0637 Don't treat values of type "Unit?" to be always equal to Unit.VALUE
Two changes here: StackValue.Constant does cast iff value is non-null (if null,
no cast between classes is really needed, as null can be an instance of
anything), and codegen for safe qualified expressions uses correct type for the
expression

 #KT-4265 Fixed
2013-12-09 15:52:19 +04:00
Alexander Udalov 4ecd1a8f68 Don't fail when using Unit class object as a value
#KT-4243 Fixed
2013-12-04 15:57:52 +04:00
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00