Tianyu Geng
a08ab45e22
FIR IDE: make all HL tests covering depended mode
...
Also changed tests to do the analysis on the KtElement of
interest instead of the KtFile where possible because currently depended
mode does not support analysing the entire file. Maybe we should support
analysing the whole file at some point.
2021-10-14 06:05:32 +03:00
Tianyu Geng
0f016c89aa
FIR LL: use real FIR in HL API implementation
...
In depended mode, a fake file is created and hence some generated FIR
elements are based on this fake file. However, FIR cares about the
identity of FIR elements: for example, loading overridden symbol does
not work with fake FIR elements. This change makes LL API to always
create FIR elements from the underlying real PSI so that HL API
implementation to always use the real FIR element to answer queries.
2021-10-14 06:05:32 +03:00
Dmitry Petrov
6f33259bc3
PSI2IR KT-49203 INVISIBLE_FAKE setter is non-referenceable
2021-10-13 18:38:23 +03:00
Svyatoslav Scherbina
990afcc06f
Native: improve exception messages when building DFG vtable/itable
2021-10-13 15:13:43 +00:00
Dmitry Petrov
2a00def84e
JVM_IR make proxy funs for inline and arrayOf funs non-synthetic
2021-10-13 16:07:53 +03:00
Viacheslav Kormushkin
fcb8f331dc
KMM: can't set isAllowInsecureProtocol using cocoapods plugin
...
#KT-48259
Merge-request: KT-MR-4728
2021-10-13 12:59:49 +00:00
Svyatoslav Kuzmich
4e74e9baee
[Wasm] Add test for KT-49182
2021-10-13 15:30:00 +03:00
Artem Kobzar
f645c89ebf
fix(KT-43191): add static qualifier for Companion and non-inner objects.
2021-10-13 11:09:59 +00:00
Svyatoslav Kuzmich
90dd0c6150
[JS] Fix and mute failed tests on TC
2021-10-13 01:26:27 +03:00
Alexander Udalov
357f3184bf
JVM IR: fix the type of IrGetField
...
The `irGetField` utility uses the field's own type as the type of the
resulting expression. But the field's type does not make sense outside
of the place of declaration of the field if it references a generic type
parameter of the containing class. Using this non-sensical generic type
led, for example, to an error in Ieee754 intrinsic (KT-48648).
The type of the expression should be kept as is in
JvmPropertiesLowering, i.e. taken from `expression` which the lowering
is replacing with the field access.
#KT-48648 Fixed
2021-10-12 23:35:17 +02:00
Svyatoslav Kuzmich
279f184703
[JS] Remove failed checks based on unstable naming
2021-10-12 23:29:39 +03:00
Svyatoslav Kuzmich
3f8dce4b53
[JS IR] Support per-file mode and ES modules
2021-10-12 23:29:39 +03:00
Svyatoslav Kuzmich
f479ac5c3a
Remove implementation specific access to _ from test
...
Operator `new` is already tested with String class
2021-10-12 23:01:01 +03:00
Svyatoslav Kuzmich
5affd9d2f9
Visit declaration reference when visiting member access
2021-10-12 23:01:00 +03:00
Roman Golyshev
d3e2f9a3f6
[FIR IDE] Fix bug in diagnostics' combining during code generation
2021-10-12 19:21:11 +00:00
Dmitry Petrov
b946a284b0
JVM_IR move 'arrayOf' handling to JvmBuiltInsLowering
...
FunctionReferenceLowering creates calls to 'arrayOf' functions that
should be processed later.
2021-10-12 21:12:44 +03:00
Dmitry Petrov
27e5655480
JVM_IR minor: more JvmIrBuilder helpers
2021-10-12 21:12:43 +03:00
Yahor Berdnikau
4339671457
Migrate configuration cache tests to new test DSL.
...
^KT-45745 In Progress
2021-10-12 19:22:15 +03:00
Yahor Berdnikau
208422d2ec
Populate settings also for buildSrc module.
...
^KT-45745 In Progress
2021-10-12 19:22:14 +03:00
Yahor Berdnikau
38849b7be4
Add helper to create temp directory.
...
This directory will be cleaned up on successful test, but will be left
on test error.
^KT-45745 In Progress
2021-10-12 19:22:13 +03:00
Yahor Berdnikau
6c747d33f7
Add Js and MPP plugins to default setup.
...
^KT-45745 In Progress
2021-10-12 19:22:12 +03:00
Yahor Berdnikau
9e21bda307
Also setup default settings values for 'settings.gradle.kts'.
...
^KT-45745 In Progress
2021-10-12 19:22:10 +03:00
Yahor Berdnikau
5d07eb77f2
Allow declaring @GradleTestVersions for the whole test suite.
...
^KT-45745 In Progress
2021-10-12 19:22:09 +03:00
Mark Punzalan
4f0b52b653
FIR: Transform annotations on type arguments during body resolve.
2021-10-12 18:56:32 +03:00
Dmitriy Novozhilov
d6e428cd98
[Build] Add FIR plugin prototype tests to firCompilerTest task
2021-10-12 17:26:45 +03:00
Dmitriy Novozhilov
fce6efe412
[FIR] Validate generated member declarations
2021-10-12 17:26:44 +03:00
Dmitriy Novozhilov
7f836ee6c3
[FIR] Remove AllOpen prefixes from fir plugin prototype entities
2021-10-12 17:26:43 +03:00
Dmitriy Novozhilov
b4d955838e
[FIR] Properly use FirContainingNamesAwareScope in all places
...
Split some delegating scopes to basic and name aware implementations
Also get rid of getContainingCallableNamesIfPresent and
getContainingClassifierNamesIfPresent functions because they are not
needed anymore
2021-10-12 17:26:43 +03:00
Dmitriy Novozhilov
5f625f3c16
[FIR] Fail with error if multiple plugins generated classes with same classId
...
In future we can turn this failure to some proper diagnostic
2021-10-12 17:26:42 +03:00
Dmitriy Novozhilov
af6d6ec2b9
[FIR] Properly collect constructors from class in presence of plugins
2021-10-12 17:26:41 +03:00
Dmitriy Novozhilov
6712191538
[FIR] Update plugin prototype testdata
2021-10-12 17:26:41 +03:00
Dmitriy Novozhilov
9a802e7cd7
[FIR] Return symbols instead of FIR from FirPredicateBasedProvider
2021-10-12 17:26:40 +03:00
Dmitriy Novozhilov
1cfe4deda9
[FIR] Remove unused methods from FirPredicateBasedProvider
2021-10-12 17:26:40 +03:00
Dmitriy Novozhilov
6a14d91dbd
[FIR] Change predicate providing API for FIR extensions
...
Predicate declaration was split into two parts:
- registering any number of predicates which are used in specific extension
- special checks for declaration applicability for each specific extension
2021-10-12 17:26:39 +03:00
Dmitriy Novozhilov
20e35167c8
[FIR] Add simple IR body generator to FIR plugin prototype
2021-10-12 17:26:39 +03:00
Dmitriy Novozhilov
fc1f2e9c72
[FIR2IR] Run IrGenerationExtensions after fir2ir stage
2021-10-12 17:26:38 +03:00
Dmitriy Novozhilov
b3768a201f
[FIR2IR] Create special IrDeclarationOrigin for generated declarations
2021-10-12 17:26:37 +03:00
Dmitriy Novozhilov
233b9f1242
[FIR] Generate IR for generated FIR declarations
2021-10-12 17:26:37 +03:00
Dmitriy Novozhilov
e3579389ee
[FIR] Create IR text tests for declarations generators
2021-10-12 17:26:36 +03:00
Dmitriy Novozhilov
b454fcc1e0
[FIR] Save IR dumps to .ir.txt files instead of .txt in tests
...
This is needed to avoid clashes between different dumps from different
handlers
2021-10-12 17:26:36 +03:00
Dmitriy Novozhilov
0f076e16ed
[FIR] Update plugin testdata
2021-10-12 17:26:35 +03:00
Dmitriy Novozhilov
c60ba51f8f
[FIR] Include generated declarations into FIR dump in tests
...
Also include non root package directive of FirFile to dump
2021-10-12 17:26:34 +03:00
Dmitriy Novozhilov
ea93d23dca
[FIR] Move fir plugin tests to diagnostics sub directory
2021-10-12 17:26:34 +03:00
Dmitriy Novozhilov
79f1779d89
[FIR] Add methods to collect all class and callable ids from extensions
...
They will be needed for generating IR for all declarations from plugins
2021-10-12 17:26:33 +03:00
Dmitriy Novozhilov
9baf10cfcc
[Build] Remove forgotten comment from build config
2021-10-12 17:26:33 +03:00
Dmitriy Novozhilov
38877ba842
[FIR] Implement extension for providing additional type attributes
2021-10-12 17:26:32 +03:00
Dmitriy Novozhilov
32709151c3
[FIR] Move base FirExtension infrastructure to :fir:tree module
...
This is needed for type attribute extension which is used not only
from :resolve module but also from :(de)serialization modules
2021-10-12 17:26:32 +03:00
Dmitriy Novozhilov
e26cd74b16
[FIR] Fix applying generated supertypes for classes without explicit supertypes
2021-10-12 17:26:31 +03:00
Dmitriy Novozhilov
26fa772846
[FIR] Add ability to generate members and nested classifiers for existing classes
2021-10-12 17:26:30 +03:00
Dmitriy Novozhilov
9bfa6c54b8
[FIR] Inherit FirContainingNamesAwareScope from FirScope
...
This is needed to simplify FirScope hierarchy, because in
fact all inheritors of `FirContainingNamesAwareScope` were
inheritors of `FirScope` too
2021-10-12 17:26:29 +03:00