Mikhail Glukhikh
0b31e5ad63
K2: reproduce & add test for KT-56511
2023-03-17 14:57:40 +00:00
Kirill Rakhman
9b89759755
[FIR] Explicitly resolve synthetic property return type if necessary
...
During implicit body resolve phase, we can encounter a reference to a
not yet resolved Kotlin class that inherits a synthetic property from a
Java class. In that case, resolve the return type in
FirSyntheticPropertiesScope.
#KT-57166 Fixed
2023-03-17 13:31:45 +00:00
Kirill Rakhman
6aef11704b
[FIR2IR] Optimize imports in CallAndReferenceGenerator
2023-03-17 13:29:49 +00:00
Kirill Rakhman
7a6a3a0b1d
[FIR2IR] Fix generation of val initialization after smart-cast, again
...
#KT-57284
2023-03-17 13:29:48 +00:00
Dmitriy Novozhilov
ca2492e1f8
[FIR2IR] Unwrap substitution overrides during generation of delegated members
...
^KT-55828 Fixed
2023-03-17 12:37:33 +00:00
Dmitriy Novozhilov
f44fcc811b
[FIR] Set proper callable id for delegated members
2023-03-17 12:37:31 +00:00
Mikhail Glukhikh
980ab41ef1
FE: split one more test "buildList type argument is inferred into upper bound"
...
Related to KT-48445, KT-56169
2023-03-17 12:08:37 +00:00
Mikhail Glukhikh
ba2d896c01
FE: split test "buildList type argument is inferred into upper bound"
...
Related to KT-50520, KT-56169
2023-03-17 12:08:35 +00:00
Ilya Chernikov
be2a85be71
K2: support implicit integer to unsigned conversions...
...
with dedicated opt-in language feature and special
annotation or module capability.
Not intended for a general use, solves specific K/N
scenario with interop libs.
#KT-55902 fixed
2023-03-17 08:57:51 +00:00
Denis.Zharkov
3e2f8b834c
K2: Replicate K1 enhancement behavior for warning-mode top-level types
...
^KT-56657 Fixed
^KT-57307 Related
2023-03-17 08:52:31 +00:00
Mads Ager
7b7da66d2b
[K2] Update JvmDefault compatibility metadata.
2023-03-17 07:15:13 +00:00
Mads Ager
683220a32c
[K1] Remove compiler version requirements for context receivers in metadata.
2023-03-17 07:15:13 +00:00
Mads Ager
e051751005
[K2] Use metadata method kind Delegation for delegated members.
2023-03-17 07:15:12 +00:00
Pavel Kunyavskiy
e655e0a809
[K/N] Fix default argument lambda in suspend function code generation
2023-03-16 21:14:41 +00:00
Mikhail Glukhikh
0ecfcf4380
FIR2IR: make anonymous object constructor public to match K1 behavior
2023-03-16 18:07:36 +00:00
Mikhail Glukhikh
e1c2dc06f1
FIR2IR: make handling of FirRegularClass & FirAnonymousObject more consistent
...
#KT-57221 Fixed
2023-03-16 18:07:36 +00:00
Mikhail Glukhikh
51cd1b2d6f
[minor] Fir2IrVisitor: reformat
2023-03-16 18:07:36 +00:00
Mikhail Glukhikh
43a0e7ecbd
FIR2IR: add test for KT-57221
2023-03-16 18:07:35 +00:00
Dmitriy Novozhilov
507ef3e951
[FIR] Properly handle declarations from other source sessions in FirPredicateBasedProvider
...
^KT-57083 Fixed
2023-03-16 15:13:19 +00:00
Denis.Zharkov
644391a8e0
K2: Fix Java enhancement when jsr305.jar is not in classpath
...
In that case, when loading Java, we just remember the name of `@Nonnull`
argument (javax.annotation.meta.When), and then use it during enhancement
^KT-56656 Fixed
2023-03-16 14:43:05 +00:00
Denis.Zharkov
955b8e1490
K2: Introduce new FIR node kind FirFromMissingDependenciesNamedReference
...
The basic idea is that during deserialization/loading compiled
Java classes, there might be some of the dependencies absent that
are referenced from enum arguments in annotations.
Such situation is not considered as totally ill-formed, thus supporting
it, allowing to read the names of mentioned in the annotation argument
might be useful for Java enhancement
^KT-56656 In Progress
2023-03-16 14:43:05 +00:00
Denis.Zharkov
157c260fda
Add test data with current behavior for KT-56656
2023-03-16 14:43:05 +00:00
Denis.Zharkov
13febaf978
Adjust tests for JSR305 annotations being extracted
...
See the previous commits
2023-03-16 14:43:04 +00:00
aleksandrina-streltsova
34c739789f
[AA] Fix rendering for type variable with "Type is not inferred"
...
It is required to show type variable name instead of ERROR in completion
^KTIJ-20913
2023-03-16 13:57:56 +00:00
Nikolay Lunyak
967ddb8bb0
[FIR] KT-57211: Generate FirArrayOfCall for unsigned types
...
^KT-57211 Fixed
Merge-request: KT-MR-9216
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2023-03-15 17:05:09 +00:00
Nikolay Lunyak
d639215084
[FIR] KT-57095: Allow X? -> * assignments in unification
...
^KT-57095 Fixed
Merge-request: KT-MR-9180
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2023-03-15 13:56:51 +00:00
Mikhail Glukhikh
58959951d3
K2: fix CCE during bound conversion for Java raw Kotlin-based type
...
#KT-56630 Fixed
2023-03-15 13:40:49 +00:00
Alexander Korepanov
e3402fcc87
[K2 JS] Do not load transitive dependencies for building K2/JS klibs
...
^KT-57262 Fixed
2023-03-15 10:49:54 +00:00
Pavel Kunyavskiy
62fb3df7f0
[K/N] Disable scope initialization on constant access
...
^KT-57098
2023-03-15 09:03:19 +00:00
Alexander Udalov
f0fba7be64
K2: add bytecode listing tests
...
#KT-57171 Fixed
2023-03-14 21:57:26 +01:00
Ivan Kylchik
d2e92fd70d
Add additional test cases and notes for KT44429
2023-03-14 20:47:45 +00:00
Ivan Kylchik
4fc95624a0
Rename attributeOwnerIdBeforeInline to originalBeforeInline
2023-03-14 20:47:44 +00:00
Ivan Kylchik
0af4ef8ee9
Fix typo in test name: inlinInDefault -> inlineInDefault
2023-03-14 20:47:43 +00:00
Ivan Kylchik
86b3ec73d1
Add new set of tests to run JVM checks with IR inliner
2023-03-14 20:47:42 +00:00
Ivan Kylchik
bb401c39d9
Add several new SMAP tests
...
Some of them are still failing and suppose to be
fixed later
2023-03-14 20:47:39 +00:00
Ivan Kylchik
60702f0f02
Add new filed attributeOwnerIdBeforeInline to IrAttributeContainer
...
This field is null by default, and it is set to current
`attributeOwnerId` when declaration was inlined and must be
generated with new name. In its turn `attributeOwnerId` must be set to
`this` to show that this is actually a new declaration, not a copy.
2023-03-14 20:47:35 +00:00
Pavel Kunyavskiy
dc2e072af2
[K/N] Make exception handling in initializers more consistent with jvm
...
^KT-57091
2023-03-14 12:59:14 +00:00
Nikolay Lunyak
c105e63bbb
[FIR] KT-57214: Check the annotations "if possible"
...
^KT-57214 Fixed
Merge-request: KT-MR-9170
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2023-03-14 10:25:02 +00:00
Kirill Rakhman
471ecf62c8
[FIR] Fix UNRESOLVED_REFERENCE in callable reference to delegated var
...
#KT-57204 Fixed
2023-03-14 09:13:42 +00:00
Kirill Rakhman
d20ad67aa9
[FIR] Introduce extension unwrapFakeOverridesOrDelegated()
2023-03-14 09:13:41 +00:00
vladislav.grechko
35dfcb61bb
Fix specialization of equality comparison calls for inline classes
...
Receiver of equals() call should be checked instead of argument
^KT-57261: Fixed
2023-03-13 23:39:35 +00:00
vladislav.grechko
8039e30bbd
Fix condition of generating equals-impl0 call
...
This methods should not be called when instances of different inline
classes are being compared
^KT-57242: Fixed
2023-03-13 23:39:34 +00:00
Evgeniy.Zhelenskiy
948714e7e5
[IR] Fix delegating MFVC constructors
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-13 19:49:10 +01:00
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
Evgeniy.Zhelenskiy
3b5ad0681f
[IR] Fix compiler bugs with MFVC to let KorGE run
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-13 13:09:56 +00:00
Evgeniy.Zhelenskiy
19424702e0
[IR] Fix mutable shared reference of MFVC type
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-13 13:09:55 +00:00
Kirill Rakhman
9f33c64715
[FIR] Remove duplicate FirCallableSymbol.isStatic extension
2023-03-13 08:48:39 +00:00
Kirill Rakhman
b476eee6e3
[FIR2IR] Simplify generation of bound callable reference receivers
...
Remove a bunch of custom logic to determine when a callable reference is
bound or not (and hence mustn't have a receiver). Instead, a helper
extension is introduced to determine when a callable reference is bound
by checking if dispatch/extensionReceiver is not FirNoReceiver and the
referenced member is not static.
#KT-57253 Fixed
2023-03-13 08:48:39 +00:00