Commit Graph

5783 Commits

Author SHA1 Message Date
Victor Petukhov 7675361380 [FE 1.0] Continue completion of calls inside that builder inference call postponed type variables of which has already been inferred 2022-05-09 12:38:39 +00:00
Victor Petukhov 94433a1600 [FE 1.0] Postpone turning NON_VARARG_SPREAD_WARNING into error till 1.8 to have a deprecation cycle of proper duration
^KT-48162
2022-05-08 10:49:16 +02: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
Mads Ager 17b5e46547 [FE1.0] Fix CFG for inline function calls in finally blocks.
The body of the InlinedLocalFunctionDeclarationInstruction was
not copied. That confuses the information on the exceptional edge
with the information on the normal edge.

^KT-52131 Fixed
2022-04-28 14:39:59 +03:00
Victor Petukhov 6c54b78574 [FE 1.0] Don't capture projections during compatibility check of supertypes to determine intersection type emptiness 2022-04-27 19:50:30 +00:00
Victor Petukhov 73be9d0a20 [FE] Don't check intersection emptiness if there were lower constraints 2022-04-27 19:50:30 +00:00
Victor Petukhov 20a8e5d742 [FE] Determine intersection type emptiness by looking at supertypes properly: substitute their type arguments 2022-04-27 19:50:29 +00:00
Victor Petukhov 54f0794ce3 [FE] Substitute erased type parameters as covariant 2022-04-27 19:50:28 +00:00
Victor Petukhov fb76d819f0 [FE] Erase type parameters of super types during intersection type emptiness check as well 2022-04-27 19:50:27 +00:00
Victor Petukhov 0f1d212fc5 [FE] Fix tests 2022-04-27 19:50:27 +00:00
Victor Petukhov 12a39d0330 [FE 1.0] Report errors due to inferred empty intersection on those candidates which were already previously discriminated by CompatibilityOfTypeVariableAsIntersectionTypePart 2022-04-27 19:50:26 +00:00
Victor Petukhov 38913b68b2 [FE] Add additional test for marking with warnings a call resolve of which is going to be changed 2022-04-27 19:50:26 +00:00
Victor Petukhov 39d13442be [FE] Support intersection type emptiness checking for interfaces 2022-04-27 19:50:25 +00:00
Victor Petukhov 1da52ab197 [FE] Add test for KT-51016 2022-04-27 19:50:25 +00:00
Victor Petukhov b32887380a [FE] Move empty intersection tests into separate directory 2022-04-27 19:50:24 +00:00
Victor Petukhov e0a1f1c405 [FE] Review fixes 2022-04-27 19:50:24 +00:00
Victor Petukhov c71ae4301c [FE 1.0] Get rid of absolute CompatibilityOfTypeVariableAsIntersectionTypePart 2022-04-27 19:50:24 +00:00
Victor Petukhov 47d6236a2d [FIR] Support determining emptiness of an intersection type with type parameters' types 2022-04-27 19:50:23 +00:00
Victor Petukhov 5bfe6cd20a [FE] Implement discussed rules to report empty intersection errors 2022-04-27 19:50:22 +00:00
Victor Petukhov b96708c3e2 [FE] Support reporting INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION for empty intersection types with type parameters 2022-04-27 19:50:21 +00:00
Victor Petukhov c16ae81a48 [FIR] Report errors for upper bounded type variables by an empty intersection type
^KT-51221 Fixed
2022-04-27 19:50:21 +00:00
Victor Petukhov 65213e9a42 [FE 1.0] Report warnings or errors for upper bounded type variables by an empty intersection type 2022-04-27 19:50:21 +00:00
Mikhail Glukhikh f65364b191 FIR: add test for #KT-49438 Obsolete 2022-04-20 22:31:54 +03:00
Ivan Kochurkin 3b8183a736 [FIR] Support of importing optional annotation classes (JS/Native), ^KT-51757 Fixed 2022-04-18 15:36:21 +00:00
Ivan Kochurkin 541fba1531 [FIR] Type argument instead of unexpected type parameter for TypeMismatch error
^KT-49035
^KT-51201 Fixed
2022-04-18 15:36:20 +00:00
Ivan Kochurkin 8c7fad9a5e [FIR] Support of type arguments in annotations ^KT-48444 Fixed 2022-04-18 15:36:19 +00:00
Ivan Kochurkin 05bed8f751 [FIR] Hide local type for return type of single expression function ^KT-51418 Fixed 2022-04-18 15:36:18 +00:00
Mikhail Glukhikh 0ecba0ad0b FIR: don't create incorrect constraints in CallableReferenceResolution
#KT-50994 Fixed
Related to KT-49477
2022-04-18 14:27:42 +00:00
Denis.Zharkov 9c7fea24d1 Fix exception when reporting WRONG_TYPE_PARAMETER_NULLABILITY_FOR_JAVA_OVERRIDE
^KT-51979 Fixed
2022-04-15 12:36:05 +00:00
Dmitriy Novozhilov 989cef6c3c [FE 1.0] Don't report OVERRIDE_DEPRECATION on default accessors of deprecated properties
^KT-51893 Fixed
2022-04-15 08:30:05 +00:00
Ilya Kirillov 66df69ea2c [low level fir, tests] temporary mute some tests with the latest full jdk
full jdk paths are not handled well after test infra rework
2022-04-13 12:53:27 +02:00
Roman Golyshev 32fa2fc476 [FIR] Resolve receiver in qualified expressions with no selector
In qualified expression like `foo().`, selector expression is null.
Because of that the whole expression was marked as an error FIR
expression, and `foo()` part was not resolved at all (including
arguments and everything else).

This commit fixes the problem by providing receiver's FIR expression
as an underlying expression for error FIR expression. That way
it will be seen by all resolve transformers and will be successfully
resolved.

^KTIJ-21484 Fixed
2022-04-12 10:55:12 +00:00
Ilmir Usmanov 6e30ce2763 FE: Make synchronized suspend functions and lambdas error in 1.8
#KT-27333 Fixed
2022-04-11 12:02:30 +00:00
Ilmir Usmanov f473998e8b FIR: Make 'suspend fun', where 'suspend' is not builtin error in 1.8
#KT-49264
2022-04-11 12:02:29 +00:00
Ilmir Usmanov f75a8109d2 FE 1.0: Make 'suspend fun', where 'suspend' is not builtin error in 1.8
#KT-49264 Fixed
2022-04-11 12:02:28 +00:00
Alexander Udalov 349c17786e Fix missing error on fun interface constructor reference
#KT-51843 Fixed
2022-04-08 14:02:14 +02:00
Ivan Kochurkin 81b1ed9ad4 [FIR] Fix false positive RETURN_TYPE_MISMATCH in intellij ultimate 2022-04-07 21:03:08 +03:00
Dmitriy Novozhilov 6e2402620f [FIR] Fix collecting member candidates on receiver with smartcast
^KT-51460 Fixed
^KT-51827
2022-04-07 12:18:48 +00:00
Denis.Zharkov 3d06a92eea K1: Adjust positioning for NO_CONTEXT_RECEIVER 2022-04-06 16:05:41 +00:00
Denis.Zharkov 512446843b FIR: Support typeRef-name label for this 2022-04-06 16:05:37 +00:00
Denis.Zharkov dfc736161a FIR: Fix overload resolution with context receivers 2022-04-06 16:05:35 +00:00
Denis.Zharkov 4349060db1 K1: Support referencing class context receivers in a form of this@Name 2022-04-06 16:05:34 +00:00
Denis.Zharkov 202413c2f4 FIR: Add context receivers from the containing class to constructors 2022-04-06 16:05:33 +00:00
Denis.Zharkov b2d5bf3eae FIR: Adjust diagnostics test data after resolution of context receivers 2022-04-06 16:05:32 +00:00
Mikhail Glukhikh 9bd6a9c069 FIR: handle 'SinceKotlin' as a special kind of deprecated
#KT-51850 Fixed
2022-04-06 12:51:20 +00:00
Ivan Kochurkin 3566b7fe02 [FIR] Fix smartcast after elvis with escaping lambda, ^KT-44510 Fixed 2022-04-05 15:50:48 +00:00
Ivan Kochurkin c7122c1492 [FIR] Fix break/continue in try-finally in loop, ^KT-51759 2022-04-05 15:50:47 +00:00
Ivan Kochurkin e9b9322672 [FIR] Track inc and dec operator calls in preliminary loop visitor, ^KT-44879 Fixed 2022-04-05 15:50:46 +00:00
Ivan Kochurkin fc77d0d26b [FIR] Fix false positive errors for members with explicit API mode, ^KT-51758 Fixed 2022-04-05 15:50:45 +00:00
Ivan Kochurkin 48dbb9ceb9 [FIR] Fix resolving of refs with implicit this in lambdas in smartcasts 2022-04-05 15:50:43 +00:00