Nikolay Lunyak
1378d730d6
[FIR] Forbid all use-site targets of FirTypeRef annotations
2023-03-07 11:35:47 +00:00
Nikolay Lunyak
93ba0c3e70
[FIR] KT-56769: Ensure @receiver: is only allowed on receivers
...
Note that there's no code that checks that
FirReceiverParameter's annotation's use-site target
is indeed `@receiver:`, because otherwise the
annotation wouldn't have made it into
the FirReceiverParameter.
In contrast, in K1 all such annotations are treated
as annotations on a KtTypeReference.
^KT-56769 Fixed
2023-03-07 11:35:46 +00:00
Zalim Bashorov
4d7cf81ed0
[Wasm] Stop supporting "_export.js" in test infra, use import/export capability in relevant tests
...
* It works slightly differently in SpiderMonkey.
* It was a hack.
2023-03-06 23:19:02 +01:00
Zalim Bashorov
bec827b654
[Wasm] Update SpiderMonkey to 112.0a1 (2023-03-04-09-52-24)
2023-03-06 23:19:02 +01:00
Alexander Udalov
47c48efa33
JVM IR: do not generate extension receiver parameter as ACC_MANDATED
...
Otherwise Java reflection is not able to load its type as a
parameterized type.
#KT-40857 Fixed
2023-03-06 20:57:52 +00:00
Kirill Rakhman
b80970b09f
[FIR] Fix references to generic synthetic properties
...
When synthetic properties are built from a substitution override,
set originalForSubstitutionOverride, too.
^KT-56251 Fixed
2023-03-06 09:45:02 +00:00
vladislav.grechko
7033d78641
Fix SAM conversion generation condition
...
Remove check if array is passed to vararg parameter as it's not
relevant anymore and leads to ^KT-51821.
^KT-51821: Fixed
2023-03-04 12:53:48 +00:00
Sergej Jaskiewicz
f40278c036
An option to allow out-of-scope type parameters in IrManglerComputer
...
In the lowered IR there are often references to type parameters whose
containers are not in the current scope. This is incorrect semantically,
but it works in practice due to erasure, so when the mangler is used on
the lowered IR, we don't want to crash the compiler.
2023-03-03 22:08:57 +00:00
Ivan Kochurkin
d829f8b684
[FIR] Drop using of JavaSymbolProvider and OptionalAnnotationClassesProvider in FirCommonSessionFactory
...
Drop using of all Java stuff inside FirCommonSessionFactory
^KT-56063
2023-03-03 20:58:24 +00:00
Svyatoslav Kuzmich
c9c0b9fd10
[Wasm] Add more jsCode diagnostic tests with String properties
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich
3566d918d2
[Wasm] Deprecate @JsFun with warning
...
kotlin.js.js("code") should be used instead
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich
01fcc84d73
[Wasm] Refactor callingWasmDirectly.kt test from @JsFun to @WasmImport
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich
7175b9f31c
[Wasm] Migrate usages of @JsFun to js("code")
2023-03-03 19:39:10 +00:00
Svyatoslav Kuzmich
7a04999e4a
[Wasm] Add K1 compiler diagnostics for js(code) calls (KT-56955)
...
This function is handled as intrinsics and supported in limited context
2023-03-03 19:39:10 +00:00
Svyatoslav Kuzmich
71e6b19760
[Wasm] Support restricted version of js("code") (KT-56955)
2023-03-03 19:39:09 +00:00
Pavel Mikhailovskii
a6e1826bbc
Reimplement the fix for KtSuperTypeList.findEntry
2023-03-03 15:38:12 +00:00
Svyatoslav Kuzmich
3c35328c09
[Wasm] Fix overriding external fun with default parameters (Fix KT-56976)
2023-03-03 12:33:53 +00:00
Kirill Rakhman
1f0e6321b0
[FIR2IR] Use companion as bound receiver if expected type requires it
...
A::foo is preferably resolved as an unbound reference to A.foo, however
if A.Companion is a subtype of A and the expected type has one fewer
parameter than the type of the unbound reference, generate a bound
reference with the companion as receiver.
^KT-56519 Fixed
2023-03-02 10:55:46 +00:00
Nikolay Lunyak
bcfafc601e
Add EnumEntries to minimal-stdlib-for-tests
...
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.
Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com >
2023-03-02 10:23:38 +00:00
Kirill Rakhman
3b9724d20e
[FIR] Desugar increment/decrement in body resolve phase
...
The expression needs to be resolved first to determine if there is a
receiver that needs to be extracted to a temporary variable. Also, the
special case for prefix increment/decrement on local variable without
delegates requires resolution to check if the variable is local.
^KT-56771 Fixed
^KT-56659 Fixed
2023-03-02 10:19:57 +00:00
Kirill Rakhman
5ecf9cce25
[FIR] Don't resolve already resolved qualified access
...
^KT-30507 Fixed
2023-03-02 10:19:53 +00:00
Kirill Rakhman
9a328ec75b
[FIR2IR] Apply implicit casts to blocks
2023-03-02 10:19:51 +00:00
Kirill Rakhman
d00513599b
[FIR2IR] Expand typealias in callable reference receiver generation
...
^KT-56750 Fixed
2023-03-02 08:20:04 +00:00
Ivan Kochurkin
ee53c5780f
[FIR] Extract K2 MPP test data to the separated directory
2023-03-01 22:10:11 +00:00
Ivan Kochurkin
9d0e02658f
[FIR] Support of ACTUAL_TYPE_ALIAS_WITH_COMPLEX_SUBSTITUTION diagnostic
2023-03-01 22:10:09 +00:00
Ivan Kochurkin
3e33258f36
[FIR] Support of ACTUAL_TYPE_ALIAS_WITH_USE_SITE_VARIANCE diagnostic
2023-03-01 22:10:08 +00:00
Ivan Kochurkin
cf1bd9837a
[FIR] Support of ACTUAL_TYPE_ALIAS_TO_CLASS_WITH_DECLARATION_SITE_VARIANCE diagnostic
2023-03-01 22:10:08 +00:00
Ivan Kochurkin
8bf9d6c92f
[FIR] Support of ACTUAL_TYPE_ALIAS_NOT_TO_CLASS diagnostic
...
^KT-56514 Fixed
2023-03-01 22:10:08 +00:00
Ivan Kochurkin
c418a7a7bf
[FIR] Support of ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS diagnostic
...
^KT-56522 Fixed
2023-03-01 22:10:07 +00:00
Ivan Kochurkin
f1fef62f76
[FIR] Consider default values from expect function during serialization
...
It's not possible to unmute some tests for K2 because it causes testData structure changing
If change testData, NATIVE doesn't work even with `IGNORE_BACKEND`
2023-03-01 22:10:07 +00:00
Ivan Kochurkin
d87619e06e
[FIR & IR] Support of default values for arguments in expect functions
...
Add FirActualDeclarationChecker that checks expect/actual return types
^KT-56331 Fixed, ^KT-56334 Fixed
2023-03-01 22:10:07 +00:00
Sebastian Sellmair
b90207edb9
[Gradle] Rename -Xdepends-on to -Xfragment-refines and use ':' for -Xfragment-sources instead of ';'
...
^KT-56210 Verification Pending
2023-03-01 16:30:44 +00:00
Sebastian Sellmair
21bf497830
[CLI] Replace K2 -Xmodule by -Xfragments and -Xfragment-sources
...
KT-56210
2023-03-01 16:30:41 +00:00
Dmitrii Gridin
8c757e36ea
[SLC] provide correct parent for annotations on type
...
The first step of KT-56870
^KT-56613
^KT-56870
2023-03-01 10:43:00 +00:00
Igor Chevdar
c038bbde08
[box-tests] Added a reproducer for KT-56965
2023-03-01 08:09:51 +00:00
Kirill Rakhman
fbc0796ed2
[FIR] Accept opt-in annotations on primary ctor params of properties
...
For backward compatibility with K1.
KT-56177
2023-02-28 10:19:20 +00:00
Kirill Rakhman
2139914061
[FIR] Add diagnostic when annotation argument is resolved ambiguously
...
Annotation arguments that are resolved in COMPILER_REQUIRED_ANNOTATIONS
phase are resolved again in ANNOTATION_ARGUMENTS phase. If they resolve
to a different symbol, report an error.
KT-56177
2023-02-28 10:19:19 +00:00
Kirill Rakhman
9dda5e4fcd
[Test] Remove redundant FIR_DISABLE_LAZY_RESOLVE_CHECKS directives
...
KT-56177
2023-02-28 10:19:18 +00:00
Kirill Rakhman
eee66ab43f
[FIR] Remove duplicate annotations from primary ctor params/properties
...
If an annotation doesn't specify an explicit use-site target,
previously it was added to both, the primary constructor value parameter
and the property in the FIR. Then, in FIR2IR, only the "correct" one was
added to the IR. Move up the deduplication logic into the frontend.
^KT-56177 Fixed
2023-02-28 10:19:17 +00:00
Kirill Rakhman
9268fd0e87
[FIR] Call enum entries in deserialized annotations as property access
...
KT-56177
2023-02-28 10:19:15 +00:00
Kirill Rakhman
e1c0d2d9c2
[Test] Remove wrong directive
2023-02-28 10:19:15 +00:00
pyos
7420008af9
FIR2IR: load property setter noinline/crossinline flags
...
#KT-56234 Fixed
2023-02-28 10:07:27 +00:00
Dmitriy Novozhilov
e0fa1e64b9
[FIR] Properly setup java parser version for CLI pipeline with light tree
...
^KT-56549 Fixed
2023-02-28 09:17:41 +00:00
Dmitriy Novozhilov
f836d16dc6
[FIR] Don't generate synthetic declarations from java records from binary dependencies
...
^KT-56548 Fixed
2023-02-28 09:17:40 +00:00
Dmitriy Novozhilov
244dbb37cf
[FIR] Properly set isOperator flag for java functions
...
^KT-56875 Fixed
2023-02-28 09:17:40 +00:00
Dmitriy Novozhilov
df47581c5a
[FIR] Consider call site in argument mapping handling for set operator call
...
^KT-56542 Fixed
^KT-56714 Fixed
2023-02-28 09:17:40 +00:00
Dmitriy Novozhilov
cbc8b74e89
[FE 1.0] Don't check star projections in PrivateInlineFunctionsReturningAnonymousObjectsChecker
...
^KT-56692 Fixed
2023-02-28 09:17:39 +00:00
Dmitriy Novozhilov
2a022ca9e0
[FIR] Properly propagate deadness from try main block throw finally block
...
^KT-56476 Fixed
2023-02-28 09:17:39 +00:00
Nikolay Lunyak
72823657c9
[FIR] Assume SafeCallsAreAlwaysNullable is always on
2023-02-27 15:00:30 +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