Commit Graph

70 Commits

Author SHA1 Message Date
Vladimir Sukharev 943306f8fe [K/N][Tests] Restore inline modifier in t59.kt test
^KT-61259
2024-01-09 14:17:47 +00:00
Vladimir Sukharev 7eb239c282 [K/N][Tests] Move objCActionFqName to NativeStandardInteropNames
^KT-61259
2024-01-09 14:17:47 +00:00
Vladimir Sukharev 28ee61c57d [K/N] Add diagnostic directives to test sources
^KT-61564
2024-01-09 14:17:47 +00:00
Vladimir Sukharev dbba6d09ff [K/N] Implement FirNativeObjCOverrideInitChecker
^KT-61564
2024-01-09 14:17:47 +00:00
Vladimir Sukharev c5aed2b094 [K/N] Implement FirNativeObjCOutletChecker and FirNativeObjCActionChecker
^KT-61564
2024-01-09 14:17:47 +00:00
Vladimir Sukharev 08bc0a6bd0 [K/N] Adjust moved special backend checks tests
^KT-61564
2024-01-09 14:17:47 +00:00
Vladimir Sukharev 8f12bf6cc8 [K/N] Move special backend checks test sources to diagnostic tests folder
^KT-61564
2024-01-09 14:17:47 +00:00
Mikhail Glukhikh 3d560cd92c K2: use correct scope for overrides calculation in ObjCName checker
To call retrieveDirectOverriddenOf,
one must use directly the owner scope of a callable symbol we consider,
and not a scope of some derived class.

#KT-64276 Fixed
2024-01-05 14:39:05 +00:00
Vladimir Sukharev 26b626c8cf [K/N][Tests] Add test for KT-64276
^KT-64276
2023-12-20 07:15:52 +00:00
Ivan Kylchik 5dbe81fd7f [FIR] Always expand a type before checking it in FirConstChecks
The issue appeared when we analyzed some typealias.
1. The typealias itself could be valid, but it could point
to an invalid type.
2. The typealias could point, for example, to an unsigned
type that must be handled in a special way

#KT-59894
2023-12-06 10:54:21 +00:00
Ivan Kochurkin 115d685d91 [FIR] Fix ambiguity of Throws and other std annotations importing
Including `SharedImmutable` and `ThreadLocal`

Simplify code, remove `DefaultImportPriority.KOTLIN_THROWS`

Introduce `FirNativeClassMapper`
2023-11-23 23:51:23 +00:00
Ilya Kirillov 8fbd6ab02b [LL FIR] do not provide cloneable for non-jvm platforms
It's a jvm-specific thing

^KT-62935 fixed
2023-11-10 06:41:03 +00:00
Ilya Kirillov bffbbe6293 [LL FIR] add LL FIR tests based on AbstractFirPsiNativeDiagnosticsTest
^KT-62910 fixed
2023-11-10 06:41:03 +00:00
Vladimir Sukharev 8395018de8 [FIR] Fix disappeared INVALID_CHARACTERS_NATIVE_ERROR
https://youtrack.jetbrains.com/issue/KT-60003/K2-Disappeared-INVALIDCHARACTERSNATIVEERROR

^KT-60003 Fixed

Merge-request: KT-MR-12686
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-10-24 16:28:30 +00:00
Nikolay Lunyak cca04bbcc2 [FIR] Check test text for all alongside tests
For some reason the practice is to configure the K2
diagnostics tests as "alongside" and instruct K1
tests to ensure there are no unexpected differences
in the sources. But someone may still forget there is
something that they need to configure in the K1 runners.
2023-10-05 08:46:54 +00:00
Vladimir Sukharev 03442e1cee [FIR] Implement FirGenericArrayClassLiteralSupport platform feature
^KT-59931 Fixed
2023-10-04 14:45:23 +00:00
Ivan Kochurkin 3cd4f7c3aa [FIR] Consider @PlatformDependent annotation everywhere (including JS and Native)
^KT-57858 Fixed

Remove FirEmptyOverridesBackwardCompatibilityHelper since it's not used anymore

Remove overridesMemberWithPlatformDependent.kt test file since it becomes redundant
2023-09-20 17:12:52 +00:00
Timofey Solonin 53584cdd49 Don't emit CAST_NEVER_SUCCEEDS when casting to a forward declaration type
^KT-58929
2023-09-13 17:49:12 +00:00
Timofey Solonin 28f90b3ea8 Add CAST_NEVER_SUCCEEDS diagnostic to forwardDeclarations.kt
Add safe as casts to forwardDeclarations.kt

^KT-58929
2023-09-13 17:49:12 +00:00
Vladimir Sukharev 3e2c662b6b [FIR] Add testcases to throw class with unresolved parent.
^KT-60048 Fixed
2023-09-08 11:40:35 +00:00
Vladimir Sukharev 69b2e2c0ba [FIR] Don't diagnose MISSING_EXCEPTION_IN_THROWS_ON_SUSPEND in presence of unresolved class
^KT-60048 Fixed
2023-09-08 11:40:35 +00:00
Vladimir Sukharev 2a4681b91d Adjust diagnostic tests for proper K1/N stdlib
^KT-58240
2023-09-05 11:42:46 +00:00
Kirill Rakhman 1c446151e7 [FIR] Skip resolvable package names in front of UNRESOLVED_REFERENCE
#KT-55471
2023-09-04 08:05:08 +00:00
Kirill Rakhman 5b9c35de2e [Tests] Update test data with error suppression warnings
#KT-61129 Fixed
2023-08-18 13:29:20 +00:00
Vladimir Sukharev 8f03eb9314 [K/N] Fix stdlib import in DiagnosticsNativeTests
Merge-request: KT-MR-11635
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-08-16 08:27:16 +00:00
Nikolay Lunyak 4a9ba1c9ac [FIR] Expand typealiases when checking deprecations
^KT-59901 Fixed
2023-08-04 10:11:57 +00:00
Pavel Kunyavskiy 6da3ecceab [K/N] Implement frontend checkers for usages forward declaration type
Forward declaration type doesn't exist in runtime. This restricts
its possible usages.

^KT-59764
2023-07-17 09:24:33 +00:00
Nikolay Lunyak 45bbd432fc [FIR Native] Stop requiring :dist for native diagnostic test
Native uses its own klib stdlib generated
via `:kotlin-native:dist`.
2023-06-07 05:20:01 +00:00
Nikolay Lunyak 70605c84df [FIR Native] KT-58549: Get rid of the builtin provider
According to
`FirNativeCodegenBoxTestGenerated.testNestedClassesInAnnotations`,
the annotation
`kotlin.internal.PlatformDependent` is
unresolved reference.

^KT-58549 Fixed
2023-06-01 10:27:54 +00:00
Nikolay Lunyak 5af4230f46 [FIR Native] KT-58549: Ensure Cloneable is accessible in native 2023-06-01 10:27:54 +00:00
Alexander Shabalin 2364ffb299 [K/N] Remove diagnostics about old Native GC ^KT-58853 2023-05-31 14:29:17 +00:00
Nikolay Lunyak 83f2c2e1f0 [FIR] KT-58623: Unify FirInlineDeclarationChecker
> Condition 'isSuspendFunctionType' is always false when reached

The change in the native tests is needed, because K2
doesn't support disabling old language features

^KT-58623 Fixed
2023-05-25 12:19:51 +00:00
Nikolay Lunyak 75c0304671 [FIR] KT-58623: Ensure the diagnostics are missing for Native 2023-05-25 12:19:51 +00:00
Sergey Bogolepov c57c34525f [K/N] KT-58562: Implement frontend checkers for HiddenFromObjC on classes 2023-05-19 11:33:17 +00:00
Sergey Bogolepov fce878d63a [K/N] KT-56464: implementation of HiddenFromObjC for classes in backend 2023-04-26 09:36:10 +00:00
Ivan Kochurkin 9a5cc39588 [FIR] Use FirDefaultOverridesBackwardCompatibilityHelper with common metadata compilation
Also, use it with JS compilation

^KT-57735 Fixed
2023-04-06 22:27:24 +02:00
Pavel Kunyavskiy 09474758ab [K/N] Fix typo in language feature name 2023-04-04 09:13:36 +00:00
Kirill Rakhman 9dda5e4fcd [Test] Remove redundant FIR_DISABLE_LAZY_RESOLVE_CHECKS directives
KT-56177
2023-02-28 10:19:18 +00:00
Nikolay Lunyak 343b856cfc [FIR] Expand typealiases in FirNativeObjC checkers 2023-01-17 06:26:39 +00:00
Kirill Rakhman 721a37f7e7 K2: implement FirLateinitIntrinsicApplicabilityChecker ^KT-55495 Fixed 2023-01-04 14:42:43 +00:00
Pavel Kunyavskiy 4928e284f6 Make LateinitIntrinsicApplicabilityChecker warning for Native and JS
This checker was enabled only on JVM by mistake.
It's now fixed, but we don't want to make it an error in minor release.
So it will be an warning in 1.8.20 and an error in 1.9.0

^KT-27002
2022-12-20 20:06:52 +00:00
Ilya Kirillov 644d1bf0d0 [FIR] ignore tests which fail because of resolve contracts violation 2022-12-12 16:21:07 +00:00
Rick Clephas b406722e20 [K/N] Prohibit empty ObjCNames 2022-09-09 12:31:36 +02:00
Rick Clephas ff1adf596d [FIR] Implement ObjCName checkers 2022-09-07 11:00:51 +00:00
Rick Clephas 0a8cefc8a5 [FIR] Add NativeObjCRefinement checkers 2022-08-22 16:10:44 +02:00
Rick Clephas 203af3afdd [FE 1.0] Add NativeObjCRefinement checkers 2022-08-22 16:10:44 +02:00
Ivan Kochurkin 0af43757e3 [FIR] Implement FirNativeIdentifierChecker
* INVALID_CHARACTERS_NATIVE
2022-07-25 23:30:10 +02:00
Ivan Kochurkin a44d5bf52f [FIR] Implement FirNativeThreadLocalChecker
* INAPPLICABLE_THREAD_LOCAL
* INAPPLICABLE_THREAD_LOCAL_TOP_LEVEL
2022-07-25 23:30:10 +02:00
Ivan Kochurkin 987137cf76 [FIR] Implement FirNativeSharedImmutableChecker
* INAPPLICABLE_SHARED_IMMUTABLE_PROPERTY
* INAPPLICABLE_SHARED_IMMUTABLE_TOP_LEVEL
2022-07-25 23:30:10 +02:00
Ivan Kochurkin ad1fb07a95 [FIR] Implement FirNativeThrowsChecker 2022-07-25 23:30:09 +02:00