Commit Graph

10984 Commits

Author SHA1 Message Date
Pavel Mikhailovskii f4bdf54601 KT-8575 Fix warnings for Java synthetic properties 2022-10-10 22:03:58 +00:00
vladislav.grechko e0c8142106 Support of custom 'equals' and 'hashCode' in inline classes
'equals' from any made available for overriding in inline classes
'typed' equals made available for definition in inline classes
'typed' equals definition made compulsory if 'untyped' is overridden
'operator' keyword is allowed in 'typed' equals definition

^KT-24874: Fixed
2022-10-10 16:52:34 +00:00
Ilmir Usmanov 808a73d5b9 FE: Change misleading error message 2022-10-05 11:51:20 +00:00
Artem Kobzar eb2326eabb [K/JS] Add ability to exclude declarations from export by a new annotation @JsExport.Ignore. 2022-10-03 11:07:25 +00:00
Nikita Nazarov bd742bb95c Account for context class receivers when creating the ExpressionReceiver
^KT-54084 Fixed
2022-09-28 18:59:56 +04:00
Nikolay Lunyak f578381726 [FIR] KT-46483: Forbid annotations in where Clauses
Merge-request: KT-MR-7208
Merged-by: Nikolay Lunyak <lunyak.kolya@mail.ru>
2022-09-28 13:38:18 +00:00
Ilmir Usmanov 4a10dbf383 FE: Warn about generic inline class parameter in LV < 1.8
#KT-54192 Fixed
2022-09-27 16:50:43 +00:00
Vladimir Dolzhenko a32c660a67 Optimize contributedDescriptors
Take kindFilters into account on early stage.

#KTIJ-23032
2022-09-27 15:17:26 +00:00
Dmitrii Gridin 64c9a9f137 AbstractResolverForProject: do not include modules info to default message
^KT-54188 Fixed
2022-09-27 08:03:53 +00:00
Nikolay Lunyak dccb7faf2e [FIR] KT-53479: Paraphrase INSTANCE_ACCESS_BEFORE_SUPER_CALL 2022-09-20 09:51:20 +00:00
Abduqodiri Qurbonzoda f2b0c30cba Remove Experimental and UseExperimental from compiler OptIn usage checkers 2022-09-17 01:06:56 +00:00
Anže Sodja 6052962f50 Register AssignResolutionAltererExtension in KotlinCoreEnvironment 2022-09-16 10:12:41 +03:00
Dmitriy Novozhilov a2c12aa711 [FE] Always report UNINITIALIZED_ENUM_COMPANION_WARNING
^KT-54055
2022-09-16 07:12:19 +00:00
Vladimir Dolzhenko da86e536ad Do not swallow exception throwing IOOBE
#KTIJ-22746
2022-09-15 21:30:34 +00:00
Mikhail Glukhikh fb9b1ad0dc K1: implement warning for upper bound violated in type alias constructors
Partially implements KT-47473
2022-09-15 08:51:46 +00:00
Mikhael Bogdanov c168a19a58 Build compiler with -Xjvm-default=all + @JvmDefaultCompatibility when needed 2022-09-14 14:40:37 +02:00
pyos be5c4a91a4 FIR/FE1.0: keep flexibility when approximating local types 2022-09-14 08:11:04 +00:00
pyos adcbc5ec99 FE1.0: keep nullability when approximating local types (in 1.9)
Report an error that inference will change and type has to be provided
manually in other language versions, since the current behavior is an
unsoundness that can cause runtime NPEs while the new behavior may
silently change overload resolution.

^KT-30054 Fixed
2022-09-14 08:11:04 +00:00
Simon Ogorodnik 95c1892ef1 K1. Fix error message for BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION 2022-09-13 13:01:58 +00:00
Mikhail Glukhikh 5fcb18ac2b Revert "[FE 1.0] Resolve this and super calls through the new type inference infra"
This reverts commit bab8047bb3.
2022-09-13 09:09:01 +00:00
Mikhail Glukhikh f35cebbc25 Revert "[FE 1.0] Resolve special construct calls through the new type inference infra"
This reverts commit e66cc9a639.
2022-09-13 09:09:01 +00:00
Mikhail Glukhikh fc0058d471 Revert "[FE 1.0] Resolve constructor calls through the new type inference infra"
This reverts commit 0070c234ce.
2022-09-13 09:09:00 +00:00
Mikhail Glukhikh c699896b0f Revert "[FE 1.0] Resolve collection literals through the new type inference infra"
This reverts commit a542de715a.
2022-09-13 09:09:00 +00:00
Mikhail Glukhikh 707bfbed19 Revert "[FE 1.0] Resolve equal calls through the new type inference infra"
This reverts commit a74c221729.
2022-09-13 09:09:00 +00:00
Mikhail Glukhikh a9b8f6715b Revert "[FE 1.0] Resolve setters through the new type inference infra"
This reverts commit 6e191147b9.
2022-09-13 09:09:00 +00:00
Mikhail Glukhikh 8be08d903b Revert "K1: don't report UNRESOLVED_WITH_TARGET on hidden setters"
This reverts commit e20efc1398.
2022-09-13 09:08:59 +00:00
Mikhail Glukhikh f4e6c1c9c5 Revert "K1: cleanup new inference constructor resolve in CallResolverUtil"
This reverts commit ec055eb418.
2022-09-13 09:08:59 +00:00
Mikhail Glukhikh 41abe7b8f7 Revert "K1: unify code around resolveCallWithGivenDescriptors"
This reverts commit 0bd06b4095.
2022-09-13 09:08:59 +00:00
Mikhail Glukhikh 60cee9f1b7 Revert "[FE 1.0] Get rid of old inference stuff from CallResolver"
This reverts commit bd665dc5d9.
2022-09-13 09:08:59 +00:00
Mikhail Glukhikh 569d6d28b7 Revert "[FE 1.0] Get rid of the old builder inference support"
This reverts commit 1c91e3a606.
2022-09-13 09:08:58 +00:00
Mikhail Glukhikh 087bda52e6 Revert "[FE 1.0] Get rid of the old inference call completer"
This reverts commit 2c7a442cbd.
2022-09-13 09:08:58 +00:00
Mikhail Glukhikh ee58de0680 Revert "[FE 1.0] Get rid of deprecated interceptCandidates in CallResolutionInterceptorExtension"
This reverts commit afaf20aea3.
2022-09-13 09:08:58 +00:00
Mikhail Glukhikh 2ac25cfa8e Revert "[FE 1.0] Get rid of CandidateResolver"
This reverts commit 4ea08a59db.
2022-09-13 09:08:58 +00:00
Mikhail Glukhikh f35ced3666 Revert "[FE 1.0] Get rid of GenericCandidateResolver"
This reverts commit 941a33a184.
2022-09-13 09:08:57 +00:00
Mikhail Glukhikh 2d17864fcb Revert "[FE 1.0] Get rid of OldResolutionCandidate and its usages"
This reverts commit d89fa8dea9.
2022-09-13 09:08:57 +00:00
Mikhail Glukhikh b12dffa593 Revert "[FE 1.0] Get rid of NewResolutionOldInference"
This reverts commit 34a05105ef.
2022-09-13 09:08:57 +00:00
Mikhail Glukhikh 3a60e2cde5 K1: add link to the issue (KT-48162) for deprecation message 2022-09-12 17:45:34 +02:00
Pavel Mikhailovskii fe5a6fd511 Disallow non-local break/continue in crossinline lambdas 2022-09-12 13:26:19 +00:00
Mikhail Glukhikh c1b0405c4e [FE 1.0] Use the old type intersection for type parameter bounds
This is a partial revert of commit bc1c2ada
We have to use old type intersector for emptiness check because
KT-53656 were found. We return to old type intersector usage also
for type parameter bounds to prevent other possible problems.
2022-09-06 17:57:02 +00:00
Mikhail Glukhikh 3bdd52b64a [FE 1.0] Return to the old type intersection emptiness check
This reverts commit 8227c4b603.
#KT-53656 Fixed
2022-09-06 17:57:01 +00:00
Pavel Kirpichenkov 24dcad0d9c [MPP] Use module's type checker for upper bound checks
The default type checker doesn't have a correct type refinement setup.
This can cause false positives in subtyping of upper bounds in edge
cases with expect type arguments.

See the tests in the intellij repo.

KTIJ-22295
2022-09-01 09:51:11 +00:00
Denis.Zharkov 3d7969ec8f Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"
This reverts commit 2053363def.

^KT-35811 Open
2022-08-30 11:21:50 +00:00
Denis.Zharkov 211d662708 Revert "KT-8263: Conditional operators are not parsed correctly"
This reverts commit ec8da2033c.

For the reason for the revert see KT-53719

^KT-8263 Open
^KT-53719 Fixed
2022-08-30 11:21:50 +00:00
Simon Ogorodnik 154e53c701 K1: add diagnostic BUILDER_INFERENCE_STUB_RECEIVER
It's reported on receivers in extension function calls with stub type,
as such calls can shadow members of finalized stub types causing
change of resolve when corresponding type argument specified explicitly

It works by checking extension receiver during call resolution parts run
That way we can easily detect if we found an extension applicable to
stub receiver and report call diagnostic for it

KT-53739
2022-08-30 10:19:26 +00:00
Simon Ogorodnik 105358dcf6 K1: add diagnostic BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION
Let's call builder lambdas (BL) a lambda that has non-fixed input type
projection at the moment of lambda arguments analysis, such lambdas
is a subject to be analyzed with builder inference
Due to bug in constraint system joining algorithm, currently system
of two or more such lambdas may lead to unsound type inference

Diagnostic added here should be reported in case when there are two
BL that shares a common constraint system, while not annotated with
@BuilderInference, as a protection against aforementioned bug

It's reported by ConstraintSystemCompleter when such situation has
occurred during builder inference phase, it is the same place that
decides wherever lambdas is subject to builder inference or not

KT-53740
2022-08-30 10:19:25 +00:00
Dmitriy Novozhilov 6573533b95 [FE 1.0] Make all components of ExpressionTypingComponents public
There is no much sense to have them package-private, since all setters
  for them are public. Also those services can be used in assign alterer
  extension
2022-08-19 07:44:08 +00:00
Dmitriy Novozhilov f843883985 [FE 1.0] Introduce AssignResolutionAltererExtension
This extension can be used to override resolution of assign statements
  with custom logic

WARNING: there is no compatibility guarantees for this extension
2022-08-19 07:44:08 +00:00
Iven Krall ec8da2033c KT-8263: Conditional operators are not parsed correctly 2022-08-16 10:00:54 +00:00
Iven Krall 2053363def KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing 2022-08-16 10:00:53 +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