Denis.Zharkov
9ee0268197
Minor. Drop unused FirTowerDataMode.SPECIAL
2022-06-06 15:18:05 +03:00
Denis.Zharkov
41dd00c241
FIR: Use outer scope for annotation arguments resolution
...
^KT-41980 Fixed
2022-06-06 15:18:05 +03:00
Denis.Zharkov
eae673233b
FIR: Rework FirRegularTowerDataContexts
...
- Get rid of SPECIAL mode (just left REGULAR and class-related instead)
- Clear naming
- Restore contexts after lambda/callable reference are processed
The test has been failing before this change because after
callable reference is resolved, its tower data context has been left
erroneously in the SPECIAL-related entry
2022-06-06 09:39:29 +00:00
Denis.Zharkov
521d6c307c
Minor. Make properties private in FirSpecialTowerDataContexts
2022-06-06 09:39:29 +00:00
Roman Golyshev
166c771e1b
[FIR IDE] Ensure resolve to CONTRACTS phase in ReturnTypeCalculator
...
If we want to analyse some function's call, we need to know about its
contracts, otherwise resolving the following code would be broken.
Computing return type of function is a prerequisite to using it in any
sensible way, so it's the best place to resolve it to CONTRACTS
KT-50733
2022-06-06 09:14:37 +00:00
Nikolay Lunyak
4038c06b1e
[FIR JS] Treat named arguments as positional for dynamics
...
Note: 174/1627 failing FirJsTest tests remaining
- 170 are multi-module tests
- 4 tests have to do with IR
2022-06-02 13:47:30 +00:00
Nikolay Lunyak
ee58b52a3d
[FIR] Fix false positive NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY
2022-06-02 13:47:29 +00:00
Nikolay Lunyak
1bf2f424a3
[FIR JS] Fix the plusAssign generation for dynamics
2022-06-02 13:47:28 +00:00
Mikhail Glukhikh
eaa77b5af6
[FIR JS] Generate dynamic FIRs via DynamicScope
2022-06-02 13:47:26 +00:00
Nikolay Lunyak
611691ec70
[FIR JS] Support smart casts for dynamic
2022-06-02 13:47:25 +00:00
Nikolay Lunyak
be9e97d044
[FIR] Introduce ConeDynamicType
2022-06-02 13:47:23 +00:00
Nikolay Lunyak
e763197c3e
[FIR] Fix the use of local ClassIds
2022-06-02 13:47:22 +00:00
Nikolay Lunyak
98c7399a35
[FIR] Remove the redundant backing field check
...
This commit fixes a failing visibility check
(FirSymbolByPsiTestGenerated.testBackingField) for the backing field.
Merge-request: KT-MR-6389
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2022-06-02 08:36:14 +00:00
Denis.Zharkov
67e6687e89
FIR: Fix FP error on a call to constructor of a private inner class
...
Do not check dispatch receiver applicability when checking visibility
for containing class of a callee constructor
2022-06-01 16:02:30 +00:00
Denis.Zharkov
c1904004c4
FIR: Fix case when smartcast receiver is used for call to private method
...
^KT-54432 Fixed
2022-06-01 16:02:30 +00:00
Roman Golyshev
01ce499bb2
[FIR] Unify some special names to make code more uniform
2022-06-01 00:11:17 +04:00
Ivan Kochurkin
792aa24a04
[FIR] Throws by star import wins builtin Throws, ^KT-52407 Fixed, ^KT-52517 Fixed
2022-05-29 23:41:27 +03:00
Ivan Kochurkin
feb3f41108
[FIR] Fix resolve inside lambda
...
The lambda is passed to extension function with type parameters
that defined inside this lambda
^KT-52197
^KT-52190 Fixed
2022-05-29 23:41:25 +03:00
Ivan Kochurkin
e69250a9fe
[FIR] Microoptimizations and clearing
2022-05-29 23:41:24 +03:00
Ivan Kochurkin
ad7c213ab2
[FIR] Initialize type for annotation arguments during deserialization
...
Get rid of IrErrorTypeImpl creating in FIR2IR
2022-05-29 23:41:23 +03:00
Victor Petukhov
867ad24c86
[FE] Show causing types in the INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION diagnostic
2022-05-27 15:14:24 +00:00
Victor Petukhov
6a34b184ac
[FE] Introduce warnings on possible empty intersection types, and improve errors reporting in general
...
^KT-52361 Fixed
2022-05-27 15:14:23 +00:00
Victor Petukhov
e133ee3765
[FE] Cache checking intersection type emptiness results
2022-05-27 15:14:23 +00:00
Victor Petukhov
02a430875f
[FE 1.0] Don't fail candidates which were marked with compatibility resolve previously
...
^KT-52431 Fixed
^KT-52393 Fixed
2022-05-27 15:14:22 +00:00
Mikhail Glukhikh
6f17a8713c
Fix KT-47708 in FIR by transferring SAM annotations to synthetic constr.
2022-05-24 12:29:28 +00:00
Mikhail Glukhikh
7c89f0188a
FIR: resolve conflicts around SAM calls properly
2022-05-24 12:29:27 +00:00
Dmitriy Novozhilov
9d4d55b3ce
[LL API] Extract expect actual matching into separate phase
2022-05-20 13:33:04 +00:00
Dmitriy Novozhilov
d66748d011
[FIR] Extract expect actual matching into separate phase
2022-05-20 13:33:04 +00:00
Denis.Zharkov
3967699430
FIR: Fix applying SAM conversion in case of DNN types
...
See org.jetbrains.kotlin.test.runners.codegen.FirBlackBoxCodegenTestGenerated.Sam.testPassSubtypeOfFunctionSamConversion
^KT-52152 Related
2022-05-19 16:54:03 +00:00
Denis.Zharkov
f70ae2df3a
FIR: Refine inference constraints when type variable in flexible position
...
That issue might be fixed via changing
TypeVariableMarker.shouldBeFlexible at ConeConstraintSystemUtilContext
but this and some other tricks have been added because of incorrect
handling of constraints where type variable has a flexible bound
^KT-51168 Fixed
2022-05-19 16:53:59 +00:00
Anastasia.Shadrina
d857142514
KT-51243 Fix parameterized contextual lambda
...
^KT-51243 Fixed
2022-05-17 15:27:26 +00:00
Denis.Zharkov
b87412c5af
FIR2IR: Fix substitution work for context receivers
2022-05-13 18:04:02 +00:00
Denis.Zharkov
9ec2411218
FIR: Fix behavior for context-receiver contained super class constructor
...
^KT-51889 Fixed
2022-05-13 18:04:02 +00:00
Roman Golyshev
254151d82c
[FIR IDE] Use proper FirSessions in FirSupertypesResolution
...
Symbols might be from other modules, so we need to use corresponding
`FirSession`s; otherwise it would be impossible to query symbols
from `firProvider`
^KTIJ-21714 Fixed
2022-05-12 21:22:22 +04:00
Dmitriy Novozhilov
2796d21ec6
[FIR] Create snapshot of tower data context for postponed callable referneces
...
This fixes an issue if type of some implicit receiver was changed because
of changed smartcast in outer scope
^KT-51228 Fixed
2022-05-12 12:15:31 +03:00
Dmitriy Novozhilov
118073e5d6
[FIR] Cleanup code of transforming callable references
2022-05-12 12:15:31 +03:00
Ilya Kirillov
6e0eba7e00
[low level api] fix ISE: Expected FirResolvedTypeRef with ConeKotlinType but was FirImplicitTypeRefImpl for CheckDslScopeViolation
2022-05-11 13:14:44 +02:00
Victor Petukhov
b8030ec1de
[FIR] Substitute lambda implicit receivers with builder inference stub types
...
^KT-51988 Fixed
2022-05-09 12:38:38 +00:00
Victor Petukhov
6027c2a9aa
[FE] Substitute fixed type variables with inferred stub types
...
Actually, a type variable might be fixed into a stub type. Such stub type should be substituted before sub calls completion
^KT-51988 Fixed
2022-05-09 12:38:37 +00:00
Ilya Kirillov
7c202948cd
[fir low level, fir] extract empty FirPredicateBasedProvider to a separate class
2022-05-05 10:43:12 +02: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
a0260292ec
[FIR] Remove always-false check for type of candidate while collection candidates
2022-04-27 19:50:28 +00:00
Victor Petukhov
39d13442be
[FE] Support intersection type emptiness checking for interfaces
2022-04-27 19:50:25 +00:00
Victor Petukhov
e0a1f1c405
[FE] Review fixes
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
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
9474406375
[FIR] Check if type variable is bounded in upper by incompatible types (resolution stage)
2022-04-27 19:50:20 +00:00
Victor Petukhov
095a5d1fdf
[FIR] Get rid of unnecessary opt ins
2022-04-27 19:50:20 +00:00
Victor Petukhov
9885094472
[FIR] Don't turn constraint storage into FREEZED stage during resolution
2022-04-27 19:50:19 +00:00
Victor Petukhov
9e9e0211eb
[FE] Check if type variable is fixed into an empty intersection type and report resolution warnings/errors if needed (completion stage)
...
^KT-51221 Fixed
2022-04-27 19:50:18 +00:00