Mikhail Glukhikh
83200f8774
FIR: Support inferring PRIVATE_TO_THIS visibility see KT-49875
2022-07-15 07:57:41 +00:00
Alexander Udalov
3b613b3745
Fix some tests related to direct invoke optimization
...
- Fix test data of light class tests
(SymbolLightClassesForLibraryTestGenerated).
- Revert the changes in kt8666.kt because they fail on JS IR, and it
seems that this test is mostly needed for JS anyway.
- Use 'invoke(' as the pattern in bytecode text tests because plain
'invoke' is used when these tests are run on JDK 11, where indy string
concatenation is enabled by default and therefore we reference
`java/lang/invoke/StringConcatFactory`.
2022-07-15 02:29:01 +02:00
Steven Schäfer
8014712569
JVM IR: Check that we generate callable references in tests
2022-07-14 23:24:18 +02:00
Steven Schäfer
2acfb3a41f
JVM IR: Avoid direct lambda invokes in inline tests
2022-07-14 23:24:18 +02:00
Steven Schäfer
f0760e0550
JVM IR: Move direct invoke optimization into a separate pass
...
This also changes the transformation to inline the body of a directly
invoked lambda rather than producing a call to an anonymous local
function. The latter is unsupported in inline functions and problematic
from an ABI perspective, since it results in functions whose name
depends on the entire source code up to this point.
2022-07-14 23:24:18 +02:00
Steven Schäfer
7d59c7689c
JVM IR: Avoid direct invokes in callable reference tests
...
Due to the direct invoke optimization, most callable reference tests
were not generating callable references/lambdas.
2022-07-14 23:24:18 +02:00
Pavel Mikhailovskii
b26155dd9e
KT-53007 Fix accessibility checks when calling a protected member via super@Outer
2022-07-14 13:09:42 +02:00
Mikhail Glukhikh
475e40b3e4
K1: report warning for inline virtual member in enum #KT-53148 Fixed
...
Related to KT-34372
2022-07-14 07:59:33 +00:00
Mikhail Glukhikh
70e15b281c
K2: fix exception in deserializer for external setter #KT-53031 Fixed
2022-07-13 17:06:14 +00:00
Pavel Kunyavskiy
5cdda48487
[K/N] Extract const val initializers to place of usage
...
This would make behaviour more consistent with jvm. There is still
a difference in behaviour about point where side effects happen.
^KT-52970
2022-07-13 08:49:40 +00:00
Igor Chevdar
e36bd5fe90
[box-tests] Added a multi-module box test
2022-07-13 08:01:51 +00:00
Vladimir Sukharev
a9789203ac
Run test genericFunctionReferenceSignature.kt only for JVM and native
...
Merge-request: KT-MR-6636
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2022-07-12 13:07:14 +00:00
Mikhail Glukhikh
c92d685415
FIR: postpone callable reference candidate in default argument case
...
#KT-53019 Fixed
2022-07-12 12:22:34 +00:00
Vladimir Sukharev
fd52f475cb
Devirtualization fails to eliminate boxing in function reference context
...
^KT-49847 Fixed
Merge-request: KT-MR-6460
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2022-07-12 08:26:27 +00:00
pyos
5a2ec4a0d5
FIR CFG: merge data flow if called-in-place lambda may not be called
2022-07-11 18:11:30 +03:00
pyos
06c7572ee5
FIR CFG: process called-in-place lambdas as loops
2022-07-11 18:11:30 +03:00
Victor Petukhov
7d945d9bdc
[FIR] Support loading rxjava3 nullability annotations on bounded wildcards
...
^KT-53041 Fixed
2022-07-11 12:44:08 +00:00
Victor Petukhov
cb2dbca0c3
[FE 1.0] Support loading rxjava3 nullability annotations on bounded wildcards
...
^KT-53041 Fixed
2022-07-11 12:44:07 +00:00
Victor Petukhov
2057deb91b
[FE 1.0] Create DONT_CARE type only for callable references with no expected type
...
Otherwise, it can be resolved safety
^KT-52270 Fixed
2022-07-11 12:44:06 +00:00
Victor Petukhov
fb21937eb1
[FE 1.0] Report INVISIBLE_MEMBER on all qualified expressions including safe call ones
...
^KT-47621 Fixed
2022-07-11 12:44:06 +00:00
Igor Chevdar
a61d05971e
[box-tests] Added a couple of multi-module box tests
2022-07-10 17:56:36 +00:00
Jaebaek Seo
ef482bb126
FIR find usage: correctly set extendsList of FirLightInterfaceClassSymbol
...
The existing code does not set the list of bases that
FirLightInterfaceClassSymbol extends for "extendsList". It collects only
the set of interfaces for "extendsList" of FirLightInterfaceClassSymbol.
However, interfaces can "extend" other classes and/or interfaces, but
they cannot "implement" other interfaces. Therefore, we have to includes
all interfaces and classes that the child interface extends in
the "extendsList". Additionally, this commit adds `private fun
PsiClass.hasSuper(..): Boolean` to FirLightClassBase that returns
whether one of recursive super classes of the PsiClass is `baseClass`
or not. This commit lets `isInheritor()` method use
`PsiClass.hasSuper()`.
2022-07-08 10:36:55 +02:00
Nikita Nazarov
939a720686
Add android ignore directives for debug mode tests
2022-07-07 14:51:24 +03:00
Nikita Nazarov
7287be6879
Add tests on variable spilling with debug mode enabled
...
#KT-48678 Fixed
2022-07-07 14:51:24 +03:00
Mikhail Glukhikh
2880cd8d5a
FIR2IR: provide more precise conversion type context at some use-sites
2022-07-06 10:02:11 +00:00
Mikhail Glukhikh
bb0191b7d5
FIR2IR: don't calculate signatures for callables when possible
2022-07-06 10:02:10 +00:00
Stanislav Erokhin
d788a927c4
Change deprecations annotation order on Ranges#endExclusive property
...
We have [Int|Long|Char]Range classes in 2 different places:
- as separate class-files
- serialized in the kotlin_builtins file
For some reason our Kotlin compiler during the JVM compilation
re-arranging the order of the annotations, so in class file they
will be written in the following order:
- Deprecated
- SinceKotlin
- ExperimentalStdlibApi
But in the kotlin_builtins they will be stored the same way as
in the sources.
We need these 2 way to be synchronized, because stub's in IDE
cares about order.
After this commit IDE test BuiltInDecompilerConsistencyTest is fixed
2022-07-05 19:50:45 +00:00
Nikolay Krasko
d080297c20
Revert "Add tests on variable spilling with debug mode enabled"
...
This reverts commit 65bb6abae4 .
2022-07-05 11:04:50 +00:00
Nikolay Krasko
c1137d9986
Revert "Set android ignore directives for debug mode tests"
...
This reverts commit 12e40e7b92 .
2022-07-05 11:04:49 +00:00
Pavel Kunyavskiy
c1ec1d9d4c
[K/N] Handle Unit? and Nothing? correctly in finally transformation
...
^KT-52985
2022-07-05 06:54:29 +00:00
Nikita Nazarov
12e40e7b92
Set android ignore directives for debug mode tests
2022-07-05 09:31:12 +03:00
Mikhail Glukhikh
730a5d1a88
FIR: introduce Java vs Kotlin class conflicts checker #KT-44441 Fixed
2022-07-04 13:28:58 +00:00
Victor Petukhov
3ed87c29c7
[FE 1.0] Substituted possible fixed type variables after completion in accordance with @OverloadResolutionByLambdaReturnType
...
^KT-48031 Fixed
2022-07-04 12:05:57 +00:00
Victor Petukhov
5b5da025f4
[FE 1.0] Don't throw empty intersection exception, return empty intersection type instead
2022-07-04 12:05:56 +00:00
Mikhail Glukhikh
4aed9511f6
FIR/FE10: fix false positives described in KT-24643
2022-07-03 19:10:02 +00:00
Mikhail Glukhikh
3223d3c3e9
Add test with false/true positives for KT-24643
2022-07-03 19:10:01 +00:00
Nikita Nazarov
65bb6abae4
Add tests on variable spilling with debug mode enabled
...
#KT-48678 Fixed
2022-07-02 18:29:18 +03:00
Mikhail Glukhikh
4737bb07df
FIR: look for conflicting declarations more precisely
2022-07-01 15:07:48 +00:00
Ilya Chernikov
854127bcc8
Fix testdata after switching Kotlin to version 1.8
...
(see the previous commit with the same title for details)
2022-07-01 14:31:45 +02:00
Ilya Chernikov
bc1e3667ff
Fix testdata after switching Kotlin to version 1.8
...
the corresponding features - GenericInlineClassParameter && DataObjects
- were turned on in 1.8 right after the last check build, therefore the
discrepancy went unnoticed
2022-06-30 16:34:14 +00:00
Pavel Mikhailovskii
8a402bcacd
KT-52875 Fix extension function literal creation with -Xlambdas=indy
2022-06-30 14:13:05 +00:00
Ilmir Usmanov
a5084c2f69
JVM IR: Make receiver type of IrGetField not null
...
otherwise, it will be mapped to inline class type if underlying type
is primitive of nullable.
#KT-52913 Fixed
2022-06-30 01:28:09 +00:00
Mikhail Glukhikh
38f4a35be2
FIR: introduce flexible types pretty rendering for no arguments case
...
#KT-52020 Fixed
2022-06-29 16:50:05 +00:00
Mikhail Glukhikh
31ec10142b
FirRenderer: add renderAllModifiers and renderDetailedTypeReferences
...
Related to KT-52020
2022-06-29 16:50:04 +00:00
Mikhail Glukhikh
9a8fa300d7
Add test for KT-52020
2022-06-29 16:50:03 +00:00
Ilya Chernikov
bb996c1b27
Switch kotlin version to 1.8
...
with appropriate fixes in testdata, tests and other
places.
2022-06-29 10:20:30 +02:00
Ilmir Usmanov
09c9641e23
FE: Use safe call when searching for suspend modifier
...
The modifier does not exist, when the parameter type is typealias.
#KT-35187 Fixed
2022-06-29 06:12:44 +02:00
Igor Yakovlev
6f88e9b16f
[WASM] Fix interop adapter for long strings
2022-06-28 18:00:40 +00:00
Dmitry Gridin
dd824aacb6
Revert "Revert "[light classes] drop old light classes and backend: iteration #2 ""
...
This reverts commit 43b4df74bc .
2022-06-28 17:57:30 +02:00
Pavel Mikhailovskii
c3c09aa95a
KT-4107 Data objects
2022-06-28 16:58:20 +02:00