Commit Graph

253 Commits

Author SHA1 Message Date
Nikolay Lunyak 2e8b177262 [FIR] Support typealiases in FirJsRuntimeAnnotationChecker 2023-01-17 06:26:37 +00:00
Nikolay Lunyak fc285c079e [FIR] Support typealiases in FirJsAbstractNativeAnnotationChecker 2023-01-17 06:26:37 +00:00
Nikolay Lunyak 5817155616 [FIR JS] Implement FirJsNameChecker 2023-01-09 08:57:12 +00:00
Nikolay Lunyak 2f9831ed99 [FIR JS] Stop reporting NON_MEMBER_FUNCTION_NO_BODY for js natives 2023-01-09 08:57:12 +00:00
Nikolay Lunyak 85bcef537c [FIR JS] Support NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE 2023-01-09 08:57:12 +00:00
Nikolay Lunyak 5b3a73f7cd [FIR JS] Implement FirJsNativeAnnotationChecker 2023-01-09 08:57:12 +00:00
Nikolay Lunyak a20e29e8b7 [FIR JS] Implement FirJsExternalChecker
The JsAllowValueClassesInExternals feature is enabled explicitly,
because otherwise it's enabled
implicitly depending on the backend. See:
org/jetbrains/kotlin/test/builders/LanguageVersionSettingsBuilder.kt:90

A property may have a fake source return kind, while its accessor
has a real source kind. In this case we can't "just copy"
the property return type down to the accessor.
2023-01-09 08:57:11 +00:00
Nikolay Lunyak 7b8f5f9980 [FIR JS] Implement FirJsRuntimeAnnotationChecker 2023-01-09 08:57:11 +00:00
Nikolay Lunyak 56285bb2d6 [FIR JS] Report CALL_TO_DEFINED_EXTERNALLY_FROM_NON_EXTERNAL_DECLARATION 2023-01-09 08:57:11 +00:00
Nikolay Lunyak 4cf8d9ffb9 [FIR JS] Implement FirJsInheritanceChecker 2023-01-09 08:57:10 +00:00
Nikolay Lunyak 9e1c6f2f61 [FIR JS] Support DYNAMIC_SUPERTYPE 2023-01-09 08:57:10 +00:00
Nikolay Lunyak 227969d787 [FIR JS] Support DYNAMIC_RECEIVER_NOT_ALLOWED 2023-01-09 08:57:10 +00:00
Nikolay Lunyak 0f876f665a [FIR JS] Support DELEGATION_BY_DYNAMIC 2023-01-09 08:57:09 +00:00
Nikolay Lunyak 95b589fd94 [FIR JS] Support DEBUG_INFO_DYNAMIC 2023-01-09 08:57:09 +00:00
Nikolay Lunyak eed2fada1f [FIR JS] Support WRONG_MULTIPLE_INHERITANCE 2023-01-09 08:57:09 +00:00
Nikolay Lunyak 0426f35684 [FIR JS] Report JS_MODULE-related diagnostics 2023-01-09 08:57:08 +00:00
Nikolay Lunyak f422a3a4e8 [FIR JS] Report WRONG_JS_QUALIFIER for the argument of JsQualifier 2023-01-09 08:57:08 +00:00
Nikolay Lunyak 73c89a5d9d [FIR JS] Prepare the test data for FIR 2023-01-09 08:57:08 +00:00
Artem Kobzar 7d881842b4 [K/JS] Include protected member declarations into checked by JsExportDeclarationChecker declarations ^Fixed KT-55786 2023-01-05 16:30:23 +00:00
Artem Kobzar 14e4febb05 [K/JS] Exclude default from the regular reserved keywords to give ability to export declarations with default export ^KT-54480 Fixed
fix(KT-54480): exclude default from the regular reserved keywords to give ability to export intities with default export.

Merge-request: KT-MR-7459
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2022-10-24 10:12:30 +00:00
Nikolay Lunyak fcd3e4f4c5 [FIR JS] KT-51740: Alter positioning of NO_VALUE_FOR_PARAMETER 2022-09-30 21:39:20 +03:00
Artem Kobzar dbda8dcad1 [K/JS] test: add @file:JsExport tests for each @JsExport test + auto-generate TypeScript export tests. 2022-08-26 09:51:59 +00:00
Ilya Goncharov 2f75ea585e [JS, Frontend] Not report warning with non-exportable super type
^KT-53539 fixed
2022-08-18 12:46:40 +00:00
Mikhail Glukhikh 7333589663 K1/K2: add Enum.entries unconditionally and filter them out in tower
Before this commit, we added Enum.entries only in case when
LanguageFeature.EnumEntries was ON (with an exception in K1/Java case).
In this commit we add Enum.entries unconditionally, and in case
the language feature is OFF we filter them out during tower resolve.
2022-08-12 09:35:27 +00:00
Victor Petukhov 42e71f8c53 Remove explicit enabling the new type inference from test data 2022-07-22 16:03:52 +00:00
Victor Petukhov 2378979a99 [FE JS] Support until operator in WRONG_OPERATION_WITH_DYNAMIC error 2022-05-31 08:42:55 +00:00
Ivan Kylchik 51ccc32a3f Update test data after introducing IntrinsicConstEvaluation annotation 2022-05-18 21:19:57 +03:00
Artem Kobzar 6da3b3b274 fix: remove unnecessary warnings for export declarations. 2022-05-13 11:10:17 +00:00
Artem Kobzar a2b40acc98 feat: add WARNING on usage top-level exportable declarations with non-consumable identifiers. 2022-05-04 11:22:57 +00:00
Victor Petukhov 27fa632630 [FE 1.0] Update test data with new error type representation 2022-03-23 21:13:33 +00:00
Vladimir Dolzhenko 918a91dbdf Escape special names with backticks in test data
#KT-51248
2022-02-10 21:20:47 +00:00
Sergej Jaskiewicz 887e91328f [JS IR] Allow value classes in external decls
Instances of value classes are passed unboxed, unless the instance is
nullable _and_ the value class wraps another nullable value.

#KT-43224 Fixed
2021-11-29 21:51:29 +00:00
Ilya Goncharov 24bc1fe1b4 [JS IR] Add test with extending exported interface 2021-11-22 12:40:28 +00:00
Ilya Goncharov 6f3985be47 [JS IR] Add test on frontend check with enum exportness
^KT-49754 fixed
2021-11-22 12:40:28 +00:00
Artem Kobzar d5dd35cb20 feat(@JsExport for interfaces): add ability to export interfaces in TypeScript. 2021-11-18 10:07:38 +00:00
Ilya Goncharov 8e5fb50506 [JS IR] Fix diagnostic test on exportness of enum classes
^KT-37916 fixed
^KT-44494 fixed
2021-11-01 13:28:23 +00:00
Artem Kobzar 979e9f94ef feat(Escaped Identifiers): add ability to use any symbol wrapped in back ticks. 2021-10-29 17:55:59 +00:00
Victor Petukhov ee728b6902 Use the new type inference for top-level callable reference resolution
^KT-47797 Fixed
^KT-47987 Fixed
^KT-45034 Fixed
^KT-48446 Fixed
^KT-13934 Fixed
2021-09-27 16:12:27 +03:00
Mikhail Glukhikh fc6403679a Rename !USE_EXPERIMENTAL test directive to !OPT_IN 2021-09-10 16:29:16 +03:00
Sergej Jaskiewicz f62ffeaa0a [JS, Frontend] Forbid @JsExporting inline/value classes
Previously the compiler would just crash.

#KT-46202 Fixed
2021-09-06 16:13:00 +03:00
Leonid Startsev 1932546a90 Support instantiation of annotations in JS
#KT-47700 Fixed
2021-09-01 11:13:55 +00:00
Leonid Startsev 83c1a75c1e Revert "Revert "Instantiation of annotations for JVM IR with the corresponding feature flag""
Fix incorrectly rebased ce0a3a57df

This reverts commit 3d0126d5
2021-07-21 18:24:07 +03:00
Leonid Startsev 3d0126d5dd Revert "Instantiation of annotations for JVM IR with the corresponding feature flag"
because of incorrect rebase

This reverts commit ce0a3a57
2021-07-21 15:23:24 +03:00
Leonid Startsev ce0a3a57df Instantiation of annotations for JVM IR with the corresponding feature flag
Seperate checker for platforms that do not support this language feature yet

Synthetic implementations of annotations are generated on-demand with proper 
equals, hashCode, and annotationType methods

#KT-47699 Fixed
2021-07-21 10:23:51 +00:00
Dmitriy Novozhilov afb7625d0c [FE 1.0] Fix false positive INTEGER_OPERATOR_RESOLVE_WILL_CHANGE
^KT-47729 In progress
2021-07-16 15:18:44 +03:00
Dmitriy Novozhilov 6afb905ad6 Add deprecation warning about new integer operators on literals resolution
#KT-38895
2021-04-14 18:30:51 +03:00
Abduqodiri Qurbonzoda 40d1849f33 Migrate compiler, idea and others to new case conversion api 2021-04-08 03:22:02 +03:00
Ilmir Usmanov 62123d72e2 IC: Add inline class -> @JvmInline value class warning 2021-02-25 16:06:47 +01:00
Pavel Kirpichenkov 5c28762c02 Fix check for local classes in approximating string table
Take local/anonymous classes and their inner classes into account.
Simplify approximation: use first available super classifier instead
of first super class. This approximation should only happen for
private declarations that were not previously approximated by frontend.
So basically the only requirement for the approximated types is to be
denotable. Note that this only works if the types are not used later.
JVM uses a different string table implementatin as it needs exact
types of private members for reflection.

^KT-20996 Fixed
2021-01-20 11:05:53 +03:00
Shagen Ogandzhanian 55a5695fc0 [JS] Forbid export of interfaces
With the only exception of external interfaces.

See https://youtrack.jetbrains.com/issue/KT-44099
2020-12-29 20:43:57 +01:00