pyos
58110709f3
Get rid of lambdas in AbstractForeignAnnotationsTestBase
...
Also enable the features from the previous two commits
2021-08-11 15:58:01 +03:00
pyos
28c473074c
Permit overriding the FIR test in FirTestDataConsistencyHandler
2021-08-11 15:58:01 +03:00
pyos
cd26ef2bb5
Add FIR version of JspecifyDiagnosticComplianceHandler
2021-08-11 15:58:01 +03:00
Mads Ager
608b88996a
[JVM_IR] Fix inlining of callable references to extension methods.
...
Check directly that the referenced function is an extension
function instead of relying on the annotation on the type.
^ KT-47988 Fixed.
2021-08-11 13:29:11 +02:00
Roman Artemev
d3ddeef67f
[JS IR] Wrap private top level function with internal accessor stub
...
In case internal inline function references private top level function
after inline such function (T.L.P.) couldn't be referenced
in klib and IC cache. So create internally visible accessors for P.T.L.
function similar to what JVM backend does.
- add box test
2021-08-10 19:52:08 +03:00
Tianyu Geng
45d31fdba2
FIR: fix atomic qualified acess sharing the same PSI with callee ref
...
Consider an atomic reference `i`, it's FIR representation is
- FirQualifiedAccessExpression
- calleeReference : FirNamedReference
Currently, both of the above FIR elements uses the same PSI element as
the source. Such problems are not present with `this` or `super` because
we manually mark them as `ExplicitThisOrSuperReference`.
This change generalizes the previous `ExplicitThisOrSuperReference` as
`ReferenceInAtomicQualifiedAccess` and fixes it for more cases.
2021-08-10 19:35:19 +03:00
Ivan Kochurkin
9736cc162b
[FIR] Throw REDECLARATION for duplicated value parameters in function
...
Add new test file
2021-08-10 15:09:26 +00:00
Mikhail Glukhikh
2c31d2e67d
FirTestDataConsistencyHandler: return back FIR files auto-generation
2021-08-10 13:19:28 +03:00
Mikhail Glukhikh
8c51c3c5c3
FirTestDataConsistencyHandler: fix behavior on Windows (partial revert)
2021-08-10 13:19:27 +03:00
pyos
cdc0f36859
Permit silencing FIR tests with results depending on configuration
2021-08-10 13:19:25 +03:00
pyos
5873511f64
Generalize AbstractForeignAnnotationsTestBase to FIR
2021-08-10 13:19:22 +03:00
pyos
e2e0358505
Remove "FIR" foreign annotation tests
...
They do not actually use FIR.
2021-08-10 13:19:21 +03:00
Tianyu Geng
1607a8231a
FIR checker: ABSTRACT_PROPERTY_IN_PRIMARY_CONSTRUCTOR_PARAMETERS
2021-08-10 13:02:10 +03:00
Ilya Goncharov
766857881a
[JS IR] Review remarks
...
- Use intrinsic on this
- Enqueue invoke for DCE
- Change transform
- Ignore instead of target backend
^KT-46204 fixed
2021-08-10 07:24:51 +00:00
Georgy Bronnikov
1d913a6bf0
JVM_IR: add test for serialization of raw types
2021-08-10 00:37:46 +03:00
Georgy Bronnikov
3b8cb4b00d
ModuleTransformerForTwoFilesBoxTests -> SplittingModuleTransformerForBoxTests
...
Need to include Java files in IR serialization tests, so generalize
TwoFilesBoxTest for more than two files.
2021-08-10 00:37:44 +03:00
Georgy Bronnikov
fb801bdc33
IR: fix mangling of toplevel properties
2021-08-10 00:37:36 +03:00
Georgy Bronnikov
54957ead5c
JVM_IR: add test for signatures of flexible types
2021-08-10 00:37:27 +03:00
Alexander Udalov
afacff326d
JVM IR: fix smart cast on argument of 'throw'
...
#KT-48163 Fixed
2021-08-09 22:34:44 +02:00
Andrey Zinovyev
1b81018b69
[FIR] Fix overloading of renamed jvm methods
...
#KT-48102 Fixed
2021-08-09 15:22:06 +03:00
Tianyu Geng
758859f198
FIR checker: report JAVA_TYPE_MISMATCH
2021-08-09 14:38:29 +03:00
Alexander Udalov
bc5a79ffcc
Minor, add test on repeatable annotations on property getters
...
#KT-14392
#KT-36476
2021-08-06 22:47:44 +02:00
Alexander Udalov
f8af127a4e
Do not load Java @Repeatable for Kotlin-repeatable annotations
...
#KT-48131 Fixed
2021-08-06 22:47:36 +02:00
Tianyu Geng
7e2f15f532
FIR DFA: fix logic clear aliasing
...
The logic should clear back aliases as well. To ensure all back aliases
don't lose any information, statements on the original variable are
copied over to its aliases.
2021-08-06 22:57:15 +03:00
Tianyu Geng
f737d8002e
FIR: allow no else branch for when on Nothing(?)
2021-08-06 22:57:12 +03:00
Ivan Kylchik
6482abc602
Add CompileTimeCalculation annotation as helper to interpreter's tests
2021-08-06 13:33:25 +03:00
Ivan Kylchik
1978bfcd85
Rewrite rendering of meta info for CHECK_NOT_NULL in interpreter's test
...
This way it is possible to unify rendering of elements built by psi2ir
and fir2ir.
2021-08-06 13:33:22 +03:00
Ivan Kylchik
6fe8dd1254
Add ir interpreter tests for ir built from psi
2021-08-06 13:32:57 +03:00
Victor Petukhov
cd09c8ba51
Report CANNOT_INFER_PARAMETER_TYPE on any error value parameters of a lambda
...
^KT-48058 Fixed
2021-08-06 13:27:57 +03:00
Victor Petukhov
1966915e92
Create DONT_CARE type only for dependent lambdas (i.e. to be resolved through the type inference later)
...
^KT-47493 Fixed
2021-08-06 13:27:56 +03:00
Dmitry Petrov
02d8c7527e
JVM_IR more aggressive if-null expressions fusion
...
Assume that changing a return type from T to T?
is not a binary-compatible change.
2021-08-05 17:51:49 +03:00
Dmitriy Novozhilov
6f0bf766f2
[Test] Add single service for checking that codegen test is ingored
...
This approach is better than manual check for `IGNORE_BACKEND` directive
because it also tracks `IGNORE_BACKEND_FIR` directive and reduces
duplicating code
2021-08-05 16:59:00 +03:00
Dmitriy Novozhilov
c8386ad1c7
[Test] Properly handle output from separate jvm instance in box tests
2021-08-05 16:58:59 +03:00
Dmitriy Novozhilov
8578f0beea
[FE 1.0] Check for type mismatch for empty when statements
...
^KT-47922 Fixed
2021-08-04 19:33:45 +03:00
Victor Petukhov
13cb3c138a
Update FE tests
2021-08-04 17:36:53 +03:00
Victor Petukhov
7567597be6
Java nullability checker: take type arguments' types from resolution atom if possible, instead of from resolved call directly
...
^KT-47833 Fixed
2021-08-04 17:36:51 +03:00
Victor Petukhov
93f9d9dacd
Check if the intersecting types aren't empty during finding the result type for variable fixation
...
^KT-47941 Fixed
2021-08-04 17:36:50 +03:00
Andrey Zinovyev
ec4cbfef59
[FIR] UNREACHABLE_CODE diagnostic (wip)
...
Implementation for PSI only
2021-08-04 14:42:24 +03:00
Dmitry Petrov
bd71fbe982
JVM_IR KT-34594 strip fake variable initialization during inlining
2021-08-03 20:41:31 +03:00
Dmitry Petrov
37050e0616
JVM_IR KT-34594 don't generate fake local variable for @InlineOnly
2021-08-03 20:41:31 +03:00
Dmitriy Novozhilov
17bbedbc50
[Test] Fix FileComparisonFailureFirst comparator to keep sorting stability
2021-08-02 20:07:49 +03:00
Dmitriy Novozhilov
ca40cbede5
[Test] Get rid of BackendKindExtractor
2021-08-02 20:07:49 +03:00
Dmitriy Novozhilov
08a1134fff
[Test] Remove abstract MultiModuleInfoDumper
2021-08-02 20:07:47 +03:00
Dmitriy Novozhilov
90e06bf403
[Test] Reformat AbstractIrSerializeCompileKotlinAgainstInlineKotlinTest
...
- Extract IrInlineBodiesHandler to separate file
- Replace SerializeSetter environment configurator with SERIALIZE_IR
directive
2021-08-02 20:07:46 +03:00
Dmitriy Novozhilov
a66f3d26fd
[Test] Replace three fixed phases of tests with step system
...
Now each test is just a sequence of any number of different steps. There
are two kinds of steps:
1. Run some facade
2. Run handlers of specific artifact kind
Through the test each module passed to each step (if it is compatible
by kinds of artifacts)
2021-08-02 20:07:45 +03:00
Dmitriy Novozhilov
ba48f80e53
[Test] Introduce single interface for all entities which provides directive containers and test services
2021-08-02 20:07:44 +03:00
Dmitriy Novozhilov
199ec60742
[JVM] Reduce number of param slots for string concatenation
...
With paramSlot = 200 those tests fails on JDKs which are newer than JDK 9
- testConcatDynamic200Long
- testConcatDynamicIndy200Long()
2021-08-01 22:23:48 +03:00
Dmitriy Novozhilov
5206b45ce3
[Test] Use JDK 11 instead of JDK 9 in modern jdk tests
2021-08-01 22:23:47 +03:00
Dmitriy Novozhilov
fd537e7d5a
[Build] Detect JDK 17 in old way using environment variables
...
There is a problem that toolchains can not detect JDK 17 EAP
on windows agents. This commit will be reverted after JDK 17 release
in adoptopenjdk.net
2021-08-01 22:23:47 +03:00
Dmitriy Novozhilov
17fc1da719
[Reflection] Support java records in kotlin reflection
...
^KT-47760
2021-08-01 22:23:46 +03:00