Commit Graph

282 Commits

Author SHA1 Message Date
Mikhail Glukhikh f20e2dec31 K2: generate Unit conversion for indexed assignment at raw FIR stage
#KT-59748 Fixed
2023-07-26 06:09:15 +00:00
Artem Kobzar 53aa8eddfe [K/JS] Generate unstable names on Frontend-checks for declarations with the JsExport.Ignore annotation ^KT-60202 Fixed 2023-07-24 09:52:58 +00:00
Alexander Korepanov 89c3781c8e [JS FIR] Support NAME_CONTAINS_ILLEGAL_CHARS diagnostic
^KT-59392 Fixed
2023-07-21 13:54:34 +00:00
Alexander Korepanov 37c8ec1e51 [JS FIR] Support JS_BUILTIN_NAME_CLASH diagnostic
^KT-59391 Fixed
2023-07-21 13:54:34 +00:00
Alexander Korepanov 08d158f901 [JS FIR] Support JS module system FE diagnostics
Support CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM diagnostic
^KT-59377 Fixed

Support CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM diagnostic
^KT-59381 Fixed

Support CALL_FROM_UMD_MUST_BE_JS_MODULE_AND_JS_NON_MODULE diagnostic
^KT-59417 Fixed
2023-07-18 14:02:30 +00:00
Alexander Korepanov 6034d32d7c [JS FIR] Support DYNAMIC_NOT_ALLOWED diagnostic
^KT-59384 Fixed
2023-07-18 14:02:30 +00:00
Alexander Korepanov 39fba56de9 [JS FIR] Support PROPERTY_DELEGATION_BY_DYNAMIC diagnostic
^KT-59406 Fixed
2023-07-18 14:02:30 +00:00
Alexander Korepanov f6b7a07efe [JS FIR] Support EXTERNAL_INTERFACE_AS_REIFIED_TYPE_ARGUMENT diagnostic
^KT-59416 Fixed
2023-07-18 14:02:30 +00:00
Ilya Goncharov cb5b26d2e7 [JS] Fix diagnostics test data with IR compiler 2023-07-04 18:04:14 +00:00
Nikolay Lunyak 360d236b7e [FIR JS] KT-57601: Get rid of the builtin provider
In this example we get 2 variants of `kotlin/toString()`:
one coming from the KLib provider, and the
other coming from the builtins provider.
These are identical deserialized functions.

^KT-57601 Fixed
2023-04-25 11:29:34 +00:00
Kirill Rakhman d96c33e080 [FIR] Add dynamic stages to callable reference resolution
This fixes an overload resolution ambiguity on callable references
in the presence of a dynamic extension receiver.

#KT-58143 Fixed
2023-04-25 10:03:40 +00:00
Kirill Rakhman 6972391185 [FE] Make dynamic a suitable resulted type
This fixes a FIR-specific issue where a type variable is inferred to
Any instead of dynamic. K1 wasn't affected because of a FIR-specific
condition in ResultTypeResolver.

#KT-57962 Fixed
2023-04-20 08:45:42 +00:00
Kirill Rakhman 8b47a4fa48 [FIR] Fix resolution of objects in presence of low-priority candidates
For CallKind.VariableAccess, the condition when to *skip* resolution of
objects was previously collector.isSuccess. This wasn't strict enough
because collector.isSuccess could be true when the best found candidate
has an applicability like RESOLVED_WITH_LOW_PRIORITY (e.g. from dynamic
scope or annotated with @LowPriorityInOverloadResolution). In these
cases, we do want to resolve objects. To fix this, the condition is
changed to collector.shouldStopResolve which is stricter.

#KT-57960 Fixed
2023-04-20 08:04:07 +00:00
Kirill Rakhman ff7072830f [FIR] Make lambda parameters of dynamic function calls dynamic
#KT-57961 Fixed
2023-04-18 13:43:45 +00:00
Kirill Rakhman a3bf61c3f7 [FIR] Fix false positive error for trailing lambda on dynamic call
#KT-57961
2023-04-18 13:43:44 +00:00
Alexander Korepanov e8be3043cc [JS IR] Allow restriction of function argument by external type
Add a special annotation @JsExternalTypeArgument for
 marking function parameters. The marked parameter
 accepts an argument with an external type only.

^KT-57479 Fixed
2023-04-17 08:21:10 +00:00
Nikolay Lunyak 077f49f33b [FIR JS] KT-57822: Don't report the diagnostic for non-qualifiers
^KT-57822 Fixed
2023-04-11 13:20:42 +00:00
Nikolay Lunyak 247f5529d2 [FIR] KT-57809: Allow external constructors without arguments
The constructor with the required parameters may
not have been defined, and since JS/IR box tests
pass, it seems, we don't have to resolve
into anything meaningful. We could generate
the appropriate constructor like dynamic type
members are generated, but, again, K1 IR doesn't
even contain a delegating constructor call.

^KT-57809 Fixed
2023-04-11 08:15:44 +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
Nikolay Lunyak 03e2152957 [FIR JS] Support 2 JS diagnostics
The change in `FirDiagnosticsHandler` ensures
`DEBUG_INFO_DYNAMIC` is still reported in
`FirPsiJsOldFrontendDiagnosticsTestGenerated.testConventions`.

Support `SPREAD_OPERATOR_IN_DYNAMIC_CALL` and
`WRONG_OPERATION_WITH_DYNAMIC`
2023-04-05 16:51:51 +00:00
Nikolay Lunyak 3b0a923210 [FIR] KT-57665: Make dynamic members' parameters dynamic
Parameter types are not only used "to accept" some data,
but they also are used as inputs for inference
(expected types)

^KT-57665 Fixed
2023-04-05 16:51:50 +00:00
Nikolay Lunyak 18f80b1ab5 [FIR] KT-57665: Ensure the current K2 behavior differs from K1 2023-04-05 16:51:50 +00:00
Alexander Korepanov 4813b659ab [JS IR] Control an inheritance of non-external entity from external
Add a special annotation @JsExternalInheritorsOnly for marking
 external interfaces and classes. The marked interface or class
 can’t be a parent for non external interfaces, classes or objects.

^KT-57423 Fixed
2023-04-05 09:00:45 +00:00
Nikolay Lunyak f644eb7988 [FIR JS] Implement FirJsExportDeclarationChecker 2023-03-29 08:51:48 +03:00
Nikolay Lunyak 624162dc07 [FIR JS] Report NESTED_JS_EXPORT 2023-03-29 08:51:48 +03:00
Nikolay Lunyak 8f94899187 [FIR JS] Fix a typo in the dynamic upper bound check
`FirDynamicTypeRef` is the unresolved version, and after resolution it
becomes `FirResolvedTypeRef` with `ConeDynamicType`.
2023-03-29 08:51:48 +03:00
Nikolay Lunyak 2b5d2dc539 [FIR JS] Report rtti-related diagnostics 2023-03-29 08:51:48 +03:00
Nikolay Lunyak b385d787cc [FIR JS] KT-57200: Allow dynamic varargs
^KT-57200 Fixed
2023-03-13 15:54:52 +00:00
Artem Kobzar 633d840c88 [K/JS] Deprecate external enum declarations
^KT-57254 Fixed
2023-03-10 12:55:43 +00:00
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