Dmitrii Gridin
3fcf5c47c2
[resolution] KotlinJavaPsiFacade: replace explicit EMPTY_SCOPE check with more general
...
Someone can request search for `LocalSearchScope.EMPTY` and we can
catch this case
^KT-62892
2024-01-04 15:20:38 +00:00
Dmitrii Gridin
37ccf5d4f3
[resolution] KotlinJavaPsiFacade: do not return classes with wrong ClassId
...
We shouldn't return from `findClass`/`findClasses` Java classes with
`ClassId` different from the requested one
^KT-62892
2024-01-04 15:20:38 +00:00
Dmitrii Gridin
c6004874c1
[SLC] generate light classes for functions with JvmName and value class as parameter
...
Such functions/accessors have not-mangled names, so they can be called
from Java
^KT-63087 Fixed
2024-01-04 15:16:20 +00:00
Dmitrii Gridin
e0f524b6b3
[LC] add tests on declarations with JvmName and value classes
...
^KT-63087
2024-01-04 15:16:20 +00:00
Brian Norman
aae8cd2a7c
[FIR] Local variable assignment must be propagated before loops
...
When performing lookahead for local variable assignments, make sure
assignments taking place within loops are being propagated before loops.
This makes sure smartcasts within non-inline declarations before the
loop are disallowed.
^KT-63867 Fixed
2024-01-04 14:20:21 +00:00
Kirill Rakhman
10d6d95ee8
[Tests] Add regression test for #KT-64702
2024-01-04 14:12:42 +00:00
Nikolay Lunyak
533ed5c622
[FIR] Unwrap typealias-bounds in FirTypeParameterBoundsChecker
...
This change makes sure the test introduced
in the previous commit doesn't crash
the compiler.
^KT-64644 Fixed
2024-01-04 14:08:43 +00:00
Nikolay Lunyak
7c3042772e
[FIR] Reproduce KT-64644
...
Ensure the given code crashes the
compiler.
^KT-64644
2024-01-04 14:08:43 +00:00
Igor Chevdar
aaf34c3436
[IR] Fixed a bug with local classes extraction from lambdas
...
#KT-64508 Fixed
2024-01-04 11:15:18 +00:00
Kirill Rakhman
7fb5cbd1f8
[FIR] Implement UNNECESSARY_NOT_NULL_ASSERTION checker for java warning level types
2024-01-04 09:59:50 +00:00
Kirill Rakhman
d6bd31b313
[FIR] Implement UNNECESSARY_SAFE_CALL checker for java warning level types
...
#KT-63528 Fixed
2024-01-04 09:59:50 +00:00
Nikolay Lunyak
9c0ac27307
[FIR] Don't miss annotations on properties from primary constructors
...
^KT-64609 Fixed
2024-01-04 09:45:27 +00:00
Nikolay Lunyak
1f46aed3e0
[FIR] Reproduce KT-64609
...
^KT-64609
2024-01-04 09:45:27 +00:00
Dmitrii Gridin
af5f76048b
[SLC] AbstractSymbolLightClassesByPsiTest: add more stable order
...
Now more diff between sources and libraries are readable.
Also prefer .descriptors to .fir as FIR is a first-class support
^KT-62892
2024-01-03 21:35:12 +00:00
Dmitrii Gridin
6c7d1babf0
[Analysis API] support Java compilation in tests
...
Previously we just skipped Java sources.
The order of classes in light classes test data is changed due to
differences in implementations of `compileLibraryToJar` and `runJvmCompiler`
^KT-62892
2024-01-03 21:35:12 +00:00
Kirill Rakhman
1018ff280e
[FIR] Fully expand the bounds of type parameters for canBeNull check
...
This is required because a not-null bound `Foo` can resolve to a
`typealias Foo = Bar?` in which case we must return true.
#KT-64645 Fixed
2024-01-03 17:15:50 +00:00
Nikita Nazarov
438b2dd164
[K2, MPP] Actualize value class representation
...
^KT-63638 fixed
2024-01-03 16:39:56 +00:00
Dmitriy Novozhilov
0bd6ea764e
[FIR] Consider only normal execution path during contracts verification
...
There might be several pathes out from the function from CFG point of view:
- normal execution path
- exceptional execution path
For verification of callsInPlace contract it's needed to check only
the normal path
^KT-63414 Fixed
2024-01-03 14:18:46 +00:00
Dmitriy Novozhilov
de9826683e
[FIR] Unwrap named arguments during contracts verification
...
^KT-64501 Fixed
2024-01-03 14:18:46 +00:00
Dmitriy Novozhilov
6031f80e01
[Test] Reproduce KT-63414, KT-64500 and KT-64501
2024-01-03 14:18:46 +00:00
Brian Norman
3346cc4b19
[FIR] Lambdas without contracts should be considered repeatable
...
^KT-63777 Fixed
2024-01-03 14:08:04 +00:00
Kirill Rakhman
fd12f24725
[FIR] Only let supertypes of ILTs include Number when it's not unsigned
...
#KT-64607 Fixed
2024-01-03 12:05:18 +00:00
Dmitriy Novozhilov
56221467ff
[FIR] Rename PLUGIN_ANNOTATION_AMBIGUITY to COMPILER_REQUIRED_ANNOTATION_AMBIGUITY
...
This diagnostic may be reported even without any compiler plugins (e.g.
for annotation named `Target` or `Deprecated`), so the old name
and message were quite confusing
^KT-64654
2024-01-03 08:50:20 +00:00
Sonya Valchuk
588549d1d0
JVM_IR: add offsets to JvmStatic and JvmOverloads proxies
...
KAPT3 needs them to correct error types in arguments.
#KT-64639 Fixed
2024-01-02 17:43:09 +00:00
Alexander Korepanov
d5aaa29a7f
[JS FIR] Implement FirJsReflectionAPICallChecker diagnostic
...
^KT-60899 Fixed
2024-01-02 16:45:12 +00:00
Kirill Rakhman
5d3738c804
[FIR] Improve annotation use-site target rendring for diagnostics
...
#KT-62816 Fixed
2024-01-02 15:17:02 +00:00
Kirill Rakhman
8f3f72d9c9
[FIR] Use correct type renderer in symbol rendering for diagnostics
...
#KT-62815 Fixed
2024-01-02 15:17:02 +00:00
Kirill Rakhman
6b049df87c
[FIR] Render deprecation message if it's not a named argument.
2024-01-02 15:17:02 +00:00
Kirill Rakhman
8aa32d9f45
[FIR] Rename DUPLICATE_LABEL_IN_WHEN to DUPLICATE_BRANCH_CONDITION_IN_WHEN
...
... and fix the message
#KT-35289 Fixed
2024-01-02 15:17:02 +00:00
Kirill Rakhman
28eb78fe16
[FIR] Add description to ERROR_IN_CONTRACT_DESCRIPTION
...
#KT-49084 Fixed
2024-01-02 15:17:02 +00:00
Kirill Rakhman
0c4603f3e5
[FIR] Improve DSL_SCOPE_VIOLATION message
2024-01-02 15:17:02 +00:00
Kirill Rakhman
f4740e9e05
[FIR] Improve ASSIGNMENT_OPERATOR_SHOULD_RETURN_UNIT message
2024-01-02 15:17:02 +00:00
Kirill Rakhman
80d47d6483
[FIR] Improve LOCAL_INTERFACE_NOT_ALLOWED message
2024-01-02 15:17:02 +00:00
Kirill Rakhman
8ac7a6bb90
[FIR] Improve REDUNDANT_MODIFIER message
2024-01-02 15:17:02 +00:00
Kirill Rakhman
dd0e919860
[FIR] Fix rendering of SUBCLASS_OPT_IN_INAPPLICABLE
2024-01-02 15:17:02 +00:00
Kirill Rakhman
14bdcbfecd
[FIR] Improve NO_ELSE_IN_WHEN message
2024-01-02 15:17:02 +00:00
Kirill Rakhman
d5ed922208
[FIR] Make rendering of cone type attributes in diagnostic messages opt-in per attribute
...
#KT-63228 Fixed
2024-01-02 15:17:01 +00:00
Kirill Rakhman
2b53e4ecbd
[FIR] Replace backticks with single quotes in diagnostic messages
2024-01-02 15:17:01 +00:00
Kirill Rakhman
945e80f35e
[FIR] Fix quotes in diagnostic messages
...
#KT-62386
2024-01-02 15:17:01 +00:00
Artem Kobzar
da4c6dd443
[K/JS, K/N, K/Wasm] Fix more general case of the ^KT-61929 issue
2024-01-02 12:18:34 +00:00
Alexander Korepanov
4609b11102
[JS FIR] Add JsName clash test
...
^KT-64364
2024-01-02 10:15:02 +00:00
Alexander Korepanov
89e2af2047
[JS FIR] Fix the JsExport diagnostic for nullable primitive types
...
- Correctly handle nullable primitive types.
- Unsigned primitive arrays are not exportable.
^KT-64366 Fixed
2024-01-02 10:14:46 +00:00
Artem Kobzar
327085e026
[K/Wasm] Unmute most of the stepping tests for Wasm in K1
2023-12-28 16:32:10 +00:00
Dmitrii Gridin
d88249bda7
[Analysis API decompiler] materialize delegate declarations in stubs
...
We should materialize delegated declarations to process callables
in scopes correctly. Standalone mode works the same way as it
deserialize directly into FIR.
Another solution is to rework proto and stub serializer/deserializer to
restore FirFields like `$$delegate_0` correctly to work with
`FirDelegatedMemberScope`
^KT-62896 Fixed
^KT-64584 Fixed
2023-12-28 08:48:08 +00:00
Evgenii Mazhukin
ee3119e9d2
[KGP] Introduce Incremental Compilation Feature Toggles
...
Makes it easier to introduce a Gradle property for configuring
IncrementalCompilerRunner.
^KT-64513 Fixed
^KT-63837 In Progress
Merge-request: KT-MR-13671
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com >
2023-12-27 13:43:54 +00:00
vladislav.grechko
34bac48541
Add JVM ABI K1/K2 consistency tests
2023-12-26 10:18:19 +00:00
cristiangarcia
5a1fb78fcd
Declare generated SourceSets correctly
...
Allow Gradle to keep the track of the task generating the sources
KTI-1502 Fixed
2023-12-24 00:01:59 +00:00
Ivan Kochurkin
88f7b085e6
[FIR] Try to infer result type of incomplete when expression
...
^KT-62069 Fixed
2023-12-22 16:57:07 +00:00
Dmitrii Gridin
e2f245096c
[FIR] ReturnTypeCalculator: replace !! with useful exception
...
^KT-64196
2023-12-21 23:10:58 +01:00
Dmitrii Gridin
48c36ce475
[FIR] FirJavaFacade: calculate default value for annotations lazily
...
To avoid contract violation
^KT-62776 Fixed
2023-12-21 18:43:19 +00:00