Commit Graph

98 Commits

Author SHA1 Message Date
Ivan Kochurkin 9f8387c76a [FIR] Fix 1.(fun Int.() = 1)() call fir conversion 2021-12-09 12:31:23 +00:00
Mikhail Glukhikh 8c7f659a32 Black box: drop WITH_RUNTIME or replace with WITH_STDLIB 2021-12-09 13:26:38 +03:00
Mikhail Glukhikh 0f4647d95e Black box: update/set FIR status for some new tests 2021-12-09 13:26:37 +03:00
Anastasiya Shadrina 4d3035e2f7 [Parser] Do not support local contextual declarations 2021-12-03 20:22:17 +03:00
Anastasiya Shadrina 08570a37b8 [PSI2IR] Check how contextual functional type works with IR 2021-12-02 20:24:56 +03:00
Anastasiya Shadrina a760865767 [PSI2IR] Generate safe calls correctly 2021-12-02 20:24:54 +03:00
Anastasiya Shadrina 4d0eb74d79 [Tests] Make sure desugaring works with context receivers 2021-12-02 20:24:52 +03:00
Anastasiya Shadrina 2e97e78e6a [Tests] Add tests with default params and suspending contextual function 2021-12-02 20:24:48 +03:00
Anastasiya Shadrina 617af898b0 [FE, IR] Support deserialization 2021-12-02 20:24:37 +03:00
Anastasiya Shadrina add2ca1d11 [Tests] Try structured concurrency with context receivers 2021-12-02 20:24:28 +03:00
Anastasiya Shadrina c148a12e4b [IR] Fix functional type sample 2021-12-02 20:24:24 +03:00
Anastasiya Shadrina a091b345a0 [FE] Provide overloadability for candidates with different CR 2021-12-02 20:24:19 +03:00
Anastasiya Shadrina 155e7b211b [PSI2IR, IR] Support functional types and literals for IR 2021-12-02 20:24:17 +03:00
Anastasiya Shadrina 910660a083 [FE] Add language feature for context receivers 2021-12-02 20:24:16 +03:00
Anastasiya Shadrina d8faa9686d [Tests] Test samples from KEEP 2021-12-02 20:24:14 +03:00
Anastasiya Shadrina 403ec7a5b1 [BE] Mangle context receiver params 2021-12-02 20:24:09 +03:00
Anastasiya Shadrina f9e6365461 [Tests] Make build green again 2021-12-02 20:24:07 +03:00
Anastasiya Shadrina a2403c470f [BE] Put context receivers before an extension receiver 2021-12-02 20:24:00 +03:00
Anastasiya Shadrina 875f4ea31c [FE] Support local contextual declarations 2021-12-02 20:23:54 +03:00
Anastasiya Shadrina daa54734e5 [PSI2IR] Pass context receiver values in PropertyLValue 2021-12-02 20:23:50 +03:00
Anastasiya Shadrina 837f3b98fa [FE] Allow to infer generic property type from a context receiver type 2021-12-02 20:23:46 +03:00
Anastasiya Shadrina 1bcaeabd84 [PSI, FE, PSI2IR] Use labels for referencing specific receiver 2021-12-02 20:23:40 +03:00
Anastasiya Shadrina 307f318c9e [PSI2IR] Generate IR for functions and calls with context receivers 2021-12-02 20:23:27 +03:00
Mikhail Glukhikh cf104c8433 FIR: add status line to all failing black box tests 2021-11-20 03:37:31 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Ilmir Usmanov 3f8fa3149b Support extensions in functional supertypes
Under a flag for now.
2021-10-18 18:53:26 +03:00
Svyatoslav Kuzmich aa5f98f919 [JS] Remove KJS_WITH_FULL_RUNTIME for tests that already have WITH_RUNTIME 2021-10-07 22:36:18 +03:00
Svyatoslav Kuzmich e18980b7ad [Wasm] Clean wasm testdata annotations 2021-10-07 22:36:17 +03:00
Svyatoslav Kuzmich 6eb81517a0 [Wasm] Unmute passed Wasm tests 2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich c88cde2f8b [Wasm] DONT_TARGET_WASM_BACKEND => IGNORE_BACKEND in testdata 2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich ab9a23cbfa [Wasm][Stdlib] Reuse K/N collections and StringBuilder 2021-10-01 17:18:49 +03:00
Pavel Punegov 0b2a8c0c25 [K/N][Test] Ignore test with deprecated StringBuilder.deleteCharAt 2021-09-20 12:16:54 +03:00
Alexander Udalov ea22f4b681 IR: check absence of extension receiver in isMethodOfAny
Otherwise extension methods named toString/equals/hashCode were
generated incorrectly on JVM IR, which could result in
AbstractMethodError at runtime.

 #KT-45963 Fixed
2021-04-11 13:54:13 +02:00
Ilya Goncharov 0ddb603eaa [JS IR] Fix of test with method in abstract class calling extension on super type 2021-01-20 20:01:42 +03:00
Ilya Goncharov 50ab9ed054 [JS IR] Add test on interface with default method calling extension method on super-interface
^KT-42176 fixed
2021-01-20 14:26:38 +03:00
Svyatoslav Kuzmich fdd7fa5aea [Wasm] Mute codegen box tests 2020-11-09 16:04:43 +03:00
Vitaly fe047f9b47 [JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR 2020-05-27 00:32:56 +03:00
simon.ogorodnik 132c8ee210 [FIR] Apply GOOD testData changes after type parameters support 2020-04-13 20:26:18 +03:00
Mikhail Glukhikh f374c36cd2 [FIR2IR] Generate property extension receiver references properly 2020-04-03 13:31:15 +03:00
Jinseong Jeon de0c9a5c73 FIR: use dispatch receiver of the enclosing function if any. 2020-03-25 08:27:21 +03:00
Mikhail Glukhikh a4c7619c89 [FIR2IR] Introduce & use FirBuiltInsPackageFragment
Without this commit, JVM name mapping logic in BE does not work for FIR,
because FIR cannot use old BuiltInsPackageFragmentImpl descriptor.
In this commit we add our own implementation thus fixing
a pack of FIR black box tests.
2020-03-24 10:37:53 +03:00
Mikhail Glukhikh 20c4a7b244 [FIR2IR] Introduce staged transformation (first step)
Now FE IR -> BE IR transformation is performed in multiple stages
controller by Fir2IrConverter. Stages are
 * files & classes registration
 * supertypes & type parameters handling
 * functions & properties signature generation
 * body generation

After each step we have guarantee (with exception of local classes &
type inference combination, and external symbols) that required symbols
(class/function/property/variable/type parameter)
are already bound to real declarations and have correct parents.

This commit also fixes incorrect parents for local classes
2020-03-13 12:18:02 +03:00
Mikhail Glukhikh ed6c9e67a1 FIR2IR: convert qualifiers to companion objects, if any 2020-03-10 15:19:34 +03:00
Mikhail Glukhikh 0fee8a6946 FIR2IR: cache functions and their parents properly 2020-03-04 16:55:33 +03:00
Mikhail Glukhikh cfa626ad77 FIR2IR: introduce conversion scope, remove dispatch receiver for lambdas 2020-03-04 16:55:31 +03:00
Mikhail Glukhikh 2308e5bb7c FIR2IR: in case of use-site generic type use call from original class 2020-02-28 15:29:02 +03:00
Mikhail Glukhikh 8c155578f7 FIR2IR: generate both dispatch & extension receiver without 'else if' 2020-02-25 12:13:42 +03:00
Mikhail Glukhikh 4abbcd1267 Unmute two passing FIR black box tests (fixed by commits of demiurg) 2020-02-17 20:35:16 +03:00
Steven Schäfer 5f6af58aeb JVM IR: (Un)mute tests and add more tests for bridge generation 2020-02-07 18:44: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