Nikolay Lunyak
5505fd207e
[FIR] KT-57195: Don't approximate ft when checking override return types
...
Why does this check even exist? K1 doesn't do it.
^KT-57195 Fixed
2023-03-13 16:34:47 +00:00
Nikolay Lunyak
b385d787cc
[FIR JS] KT-57200: Allow dynamic varargs
...
^KT-57200 Fixed
2023-03-13 15:54:52 +00:00
Evgeniy.Zhelenskiy
888bf801e2
[FIR] Forbid @JvmInline with inline modifier
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-13 13:09:57 +00:00
Mikhail Glukhikh
a3f0e429e3
K2: report empty intersection warnings from completion properly
2023-03-11 10:15:25 +00:00
Mikhail Glukhikh
47fab61716
FE: introduce AllowEmptyIntersectionsInResultTypeResolver feature
...
Related to KT-51221
2023-03-11 10:15:24 +00:00
Mikhail Glukhikh
d9a6cad5ab
Disable ForbidInferringTypeVariablesIntoEmptyIntersection in some FE tests
2023-03-11 10:15:23 +00:00
Mikhail Glukhikh
b64cb67370
K2: support ForbidInferringTypeVariablesIntoEmptyIntersection on/off
2023-03-11 10:15:23 +00:00
Mikhail Glukhikh
f7544aff62
Delay ForbidInferringTypeVariablesIntoEmptyIntersection to 2.*
...
Note: here we set sinceVersion = null for this feature.
However, we plan in 1.9.* - 2.0 time frame to solve KT-56377
and to enable this feature in 2.0, the latest in 2.1.
2023-03-11 10:15:22 +00:00
Denis.Zharkov
608cb01935
K2: Imitate K1 behavior for case of captured types with a raw supertype
...
See the comments in the code, but mostly the motivation is that once
it was decided to stick with such a legacy thing as raw types,
we are ok with some corner-cases hacks for them
(if there are not too many of them) and they don't break anything
when there are no raw types in the code.
^KT-56616 Fixed
2023-03-10 18:35:01 +00:00
Nikolay Lunyak
4b8471d806
[FIR] KT-57247: Expand typealiases in annotation vararg arguments
...
^KT-57247 Fixed
2023-03-10 17:29:37 +00:00
Stanislav Ruban
5b0b7c4da4
KT-57206: Add diagnostics test
...
Problem described in KT-57206 seems to have been fixed by KT-56506. This
commit adds code example from KT-57206 as a diagnostics test.
^KT-57206 Fixed
2023-03-10 14:03:43 +00:00
Artem Kobzar
633d840c88
[K/JS] Deprecate external enum declarations
...
^KT-57254 Fixed
2023-03-10 12:55:43 +00:00
Mikhail Zarechenskiy
82524fde26
K1: Place integer cinterop conversions under a language feature
...
Note that it's quite hard to emit a particular diagnostic as
type check happens later, after the conversion
^KT-56583
2023-03-10 09:48:01 +00:00
Kirill Rakhman
fa432d7f0d
[FIR] Prioritize double over float in overload resolution
...
#KT-57194 Fixed
2023-03-09 13:00:53 +00:00
Dmitriy Novozhilov
d5e6102ed9
[FIR] Properly check is some setter function is applicable for synthetic property
...
^KT-56506 Fixed
2023-03-09 12:32:49 +00:00
Nikolay Lunyak
f39467b4ba
[FIR] KT-57175: Expand typealiases in the annotation class checker
...
^KT-57175 Fixed
2023-03-09 09:44:09 +00:00
Nikolay Lunyak
5cbe699fc4
[FIR] KT-56876: Ensure inner type classifiers are resolved in contracts
...
^KT-56876 Fixed
2023-03-09 09:43:03 +00:00
Nikolay Lunyak
c156dfe855
[FIR] KT-56877: Allow checking types of containing classes in contracts
2023-03-09 09:43:03 +00:00
Nikolay Lunyak
c7a71fec17
[FIR] KT-56877: Allow referencing implicit receivers in class contracts
2023-03-09 09:43:02 +00:00
Nikolay Lunyak
409249267c
[FIR] Ensure this@label doesn't work in K2
2023-03-09 09:43:02 +00:00
Nikita Bobko
62d2327ca3
Don't issue a warning about expect/actual in the same module for incompatible expect/actual pairs
...
^KT-57067 Fixed
Review: https://jetbrains.team/p/kt/reviews/9123
2023-03-09 09:30:29 +00:00
Kirill Rakhman
f946ddeb40
[FIR] Implement checks for contract not allowed
...
^KT-55423 Fixed
2023-03-09 08:32:02 +00:00
Kirill Rakhman
b2fbf8bed5
[FIR] Fix callable reference adaptation for overrides without defaults
...
Provide the correct scope to the argument mapping so that default values
in overridden functions are considered.
^KT-56864 Fixed
2023-03-09 08:26:16 +00:00
Kirill Rakhman
83845fbab5
[FIR] Only add non-subsumed to overridden of intersection override
...
If an intersection override overrides members A.x, B.x and C.x and
B <: A, then A.x is subsumed by B.x, and we don't add it to the list of
overridden members. This fixes a false-positive MANY_IMPL_MEMBER_NOT_
IMPLEMENTED where an implementation is subsumed by an abstract override.
^KT-57092 Fixed
2023-03-08 11:01:56 +00:00
Nikolay Lunyak
07fa86f6bc
[FIR] KT-57085: Ignore the diagnostic case in @Suppress()
...
^KT-57085 Fixed
2023-03-07 20:28:02 +00:00
Nikolay Lunyak
343deeec1c
[FIR] Check FirReceiverParameter annotations' targets
2023-03-07 11:35:47 +00:00
Nikolay Lunyak
0c77de3049
[FIR] Add a test with an inapplicable receiver annotation
2023-03-07 11:35:47 +00:00
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
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
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
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
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
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
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
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