Commit Graph

479 Commits

Author SHA1 Message Date
Jinseong Jeon 09f384d96e FIR: assure annotation argument mapping is ready
^KT-66223 fixed
2024-03-07 10:17:01 +00:00
Jinseong Jeon afd20b0c2d SLC: honor wildcard suppression on declarations
^KT-61734 fixed
2024-03-07 10:17:00 +00:00
Jinseong Jeon d63b3e9494 Extend JvmWildcardSuppress annotation tests
^KT-61734
2024-03-07 10:17:00 +00:00
Dmitrii Gridin d64fc9b777 [SLC] map kotlin.Unit type typealias into void return type
^KT-65843 Fixed
2024-02-19 21:24:42 +00:00
Dmitrii Gridin 8dd66c0810 [LC] add test on unit type actualization
^KT-65843
2024-02-19 21:24:42 +00:00
Nikolay Lunyak 7056ad5325 [FIR] Set status.isOverride for fake overrides
Even though SO may not be correct
overrides sometimes, it feels more
natural to treat fake overrides as...
well, "overrides". And without it
we'd need to make the code in
`FirOverrideChecker` less intuitive.
2024-02-15 16:10:13 +00:00
Dmitrii Gridin c78d3edd24 [SLC] support type parameter annotations
^KT-65112 Fixed
2024-02-15 15:18:02 +00:00
Dmitrii Gridin 717dd08fd4 [LC] PsiClassRenderer: render type parameter annotations
^KT-65112
2024-02-15 15:18:02 +00:00
Dmitrii Gridin 3e3c932bf6 [LC] add tests on type parameter annotations
^KT-65112
2024-02-15 15:18:02 +00:00
Jinseong Jeon b0ad91a98c SLC: create backing field for deprecated property
...since they still appear at JVM bytecode.

Also, ULC doesn't look at deprecated annotation for bail-out criteria.

^KT-65393 fixed
2024-02-11 01:41:44 +00:00
Jinseong Jeon 0533c73910 SLC: add tests about deprecated-hidden property/accessor
^KT-65393
^KTIJ-27244
2024-02-11 01:41:43 +00:00
Roman Golyshev a55b8d30fd KT-65425 [SLC] Correctly compute getQualifiedName for generated classes
Since the declarations generated by compiler plugins do not have proper
PSI (`classOrObjectDeclaration` in this case), we need to resort to
symbols for such declarations to compute the proper qualified name

^KT-65425 Fixed
2024-02-01 10:14:20 +00:00
Jinseong Jeon 43acc6516b SLC: mangle internal accessors
...by honoring accessors' visibility

We need a special handling for backing field visibility,
e.g., lateinit, const, or JvmField, but that's not the case
for accessors' visibility.

^KT-64937 fixed
2024-01-23 21:55:09 +00:00
Dmitrii Gridin cf290a73fc [Analysis API] migrate AbstractSymbolLightClassesTestBase to doTestByMainModuleAndOptionalMainFile
^KT-64805
2024-01-10 22:07:03 +00:00
Dmitrii Gridin 7c8aff963f [SLC] do not create light classes for expect declarations
We shouldn't build expect declarations as they do not
exist. We can omit check on member declarations as we
won't request them as we skip expect classes

^KT-57536 Fixed
2024-01-05 15:07:55 +00:00
Dmitrii Gridin c14c12479c [SLC] fix multifile-classes in multiplatform case
Multifile-class can contain not only files from the same
module, but also files from the common part.
This commit also fixes KotlinByModulesResolutionScopeProvider as
it should provide all transitive dependencies

^KT-64714 Fixed
2024-01-05 15:07:55 +00:00
Dmitrii Gridin fc519b2339 [SLC] add test on multiplatform facade
^KT-64714
2024-01-05 15:07:55 +00:00
Dmitrii Gridin 44388ea15f [SLC] generate correct name for property assessors in case of JvmRecord
^KT-62357 Fixed
2024-01-04 16:32:10 +00:00
Dmitrii Gridin b463f1fdfa [SLC] unmute tests on JvmRecord
^KT-62357
2024-01-04 16:32:10 +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
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
strangepleasures 7c6375c85a KT-63552 [SLC] Support empty arrays in property initializers and default parameter values 2023-11-21 13:20:26 +00:00
strangepleasures 03ed1d1d31 KT-62560 [SLC] Fix handling of empty varargs in annotations 2023-11-20 20:57:21 +00:00
Jinseong Jeon 1ccb085e68 SLC: use fully expanded type when computing nullability
^KT-62757 fixed
2023-10-25 14:59:50 +00:00
Dmitrii Gridin ec79d8cd27 [SLC] add multiplatform test cases on typealias actualization
^KT-62345
2023-10-17 17:19:40 +00:00
Mikhail Glukhikh f1a297279d Fix Java LC test for LV 2.0 (see KT-60646) 2023-09-19 15:46:27 +00:00
Dmitrii Gridin 11d86992c5 [SLC] update test data for 2.0 version
* disable compiled tests for scripts because they are not supported yet
* fix test data

^KT-60590 Fixed
2023-09-19 15:46:27 +00:00
strangepleasures cf01d2970f [SLC] [KAPT] KT-61916 Fix generation of annotations in annotation arguments 2023-09-14 13:21:07 +00:00
Dmitrii Gridin ecb808992d [SLC] add more tests on vararg
^KT-61422
2023-09-11 15:47:47 +00:00
Jinseong Jeon 4cdc22c9cc AA FIR: use fully expanded type when computing optimal type mapping mode
^KT-61460 Fixed
2023-09-05 10:33:53 +00:00
Dmitrii Gridin 2f8a64fff2 [AA FIR] fix exception from vararg parameter with invalid type
It is true that for vararg parameter `arrayElementType` always have to
be not null, but it required resolution to TYPES phase. But in case of
the error type, the type reference is treated as resolved, so we are not
obligatory to resolve such reference to TYPES, because we already have
the resolved type.
So we can make the rule of KtFirValueParameterSymbol#returnType less
strict, and varargElementType will effectively do the same as
lazy resolve + arrayElementType

^KT-61422 Fixed
2023-08-23 20:05:18 +02:00
Dmitrii Gridin 695f6f0062 [SLC] fix annotation retention mapping
^KT-61377 Fixed
2023-08-21 20:46:25 +00:00
Dmitrii Gridin 566232fd0d [SLC] add test for binary retention
^KT-61377
2023-08-21 20:46:25 +00:00
Dmitrii Gridin 51cc799204 [SLC] fix flaky test 2023-08-21 20:46:25 +00:00
Pavel Mikhailovskii 6e6a4d6411 KT-59836 [SLC] Copy type parameters from the parent interface to DefaultImpls methods 2023-07-10 13:11:21 +00:00
Ilya Chernikov b1b1eab35b K2 Scripting: fix testdata for scripts diagnostics tests 2023-07-05 19:46:04 +00:00
Jinseong Jeon a93bc60655 AA: use simple name of local type as JVM internal name
Otherwise, e.g., if a local type is within an anonymous object, full
class id will include that anonymous object too, resulting in invalid
type signature for PsiType.

^KT-59533 Fixed
2023-06-28 18:38:01 +02:00
Jinseong Jeon 2d132c6b73 SLC: run enum test w/ FULL_JDK 2023-06-23 16:19:06 +02:00
Jinseong Jeon 7f1424737e LC: rework modality of enum class
It is abstract if it has abstract member.
It is final if it doesn't have enum entries that need subclass.
Otherwise, it is open (i.e., no modifier)

^KT-57567 Fixed
2023-06-23 16:19:06 +02:00
Jinseong Jeon 5d7ac18778 SLC: drop the assertion that class context shouldn't be null
...because it can be null if an anonymous object is returned as a value
of reified inline function, which isn't materialized as LC element.

^KT-59537 Fixed
2023-06-23 10:33:58 +00:00
Marco Pennekamp f318cd8a79 [SLC/ULC] KTIJ-25335 Add tests for fields with missing names 2023-06-23 09:26:58 +00:00
Pavel Mikhailovskii c3746652a4 KT-59293 [SLC] Fix generation of DefaultImpls classes 2023-06-23 08:01:52 +00:00
Pavel Mikhailovskii 9f763deea1 KT-59325 [SLC] Fix generation of fields from companion objects 2023-06-22 14:48:12 +00:00
Pavel Mikhailovskii 134b02c754 KT-59563 [SLC] Fix type erasure in $annotations methods of extension properties 2023-06-22 09:06:12 +00:00
Jinseong Jeon 37876313c9 SLC: add nullity annotation when force-boxing return type
^KT-57579 Fixed
2023-06-20 15:43:41 +00:00
Pavel Mikhailovskii 79dbacb621 [SLC] Keep default constructor parameters' values 2023-06-20 11:00:18 +00:00
Pavel Mikhailovskii 46844100d5 Fix visibility of $annotations methods 2023-06-12 12:59:53 +00:00
Pavel Mikhailovskii 0ef31501b1 [SLC] KT-54804 Erase type and drop receiver annotations in $annotations methods 2023-06-01 18:22:03 +00:00