Denis.Zharkov
ef84dddc88
FIR: Add preliminary support for context receivers in resolution
2022-04-06 16:05:32 +00:00
Denis.Zharkov
f3e28c3767
FIR: Prepare ConeAttribute infrastructure for non-singleton attrs
2022-04-06 16:05:25 +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
1eefca4259
[FIR] Fix dependencies duplication
2022-04-05 15:50:44 +00:00
Dmitriy Novozhilov
5a3b397552
[FIR] Get rid of FirTypedDeclaration
...
`FirTypedDeclaration` has only one inheritor (`FirCallableDeclaration`),
so there is no much sense to keep this class
2022-04-04 15:23:58 +00:00
Dmitriy Novozhilov
ae0ce57b2c
[FIR] Don't force calculation of return type of overrides during status resolution
2022-04-04 15:23:57 +00:00
Dmitriy Novozhilov
effa3f197a
[FIR] Move ReturnTypeCalculator to :fir:providers module
...
Also make it an abstract class and turn ReturnTypeCalculatorForFullBodyResolve
into object (because it has no state and there is no need to create
different instances of it)
2022-04-04 15:23:56 +00:00
Dmitriy Novozhilov
ff1e2c05bf
[FIR] Fix declaration specificity rules
...
Handle visibility of declarations and setters of properties
2022-04-04 15:23:56 +00:00
Dmitriy Novozhilov
caffe36181
[FIR] Move utilities for matching overrides into separate session component
2022-04-04 15:23:55 +00:00
simon.ogorodnik
03bb482322
KT-45553. Hide declaration from star import if imported with alias
2022-03-29 23:38:42 +00:00
Evgeniy.Zhelenskiy
b6f2513dd2
[FIR] Introduce valueClassRepresentation to FIR
...
#KT-1179
2022-03-24 11:38:44 +00:00
Evgeniy.Zhelenskiy
28bf83ceac
[IR] Unite inline class and multi-field value class representation
...
#KT-1179
2022-03-24 11:38:43 +00:00
Evgeniy.Zhelenskiy
282ab398c6
[IR] Generify lowerings
...
#KT-1179
2022-03-24 11:38:42 +00:00
Victor Petukhov
b5933c70e2
[FE 1.0] Refactor error utils: split error entities and introduce error type and error scope kinds
2022-03-23 21:13:33 +00:00
Mikhail Glukhikh
bd790b792c
FIR: minor code cleanup
2022-03-15 13:21:01 +00:00
Simon Ogorodnik
f5b49e48ad
FIR. Remove visibility filtering from importing scopes
2022-03-10 20:42:38 +00:00
Simon Ogorodnik
ec3e2f7b99
FIR. Shadow classifiers from super-type scopes
2022-03-10 20:42:38 +00:00
Simon Ogorodnik
5ea1c246d7
FIR. Get rid of kotlin.Throws prioritization hack
2022-03-10 20:42:38 +00:00
Dmitriy Novozhilov
35a2a6bcec
[FIR] Store containingDeclarationSymbol for type parameters of substitution overrides
2022-02-28 11:42:33 +03:00
Ivan Kochurkin
31d9313c51
[FIR] Fix "Expected some types" exception, ^KT-51274 Fixed
2022-02-23 14:21:59 +03:00
Mikhail Glukhikh
981f8b1871
FIR: implement resolve of unqualified enum references in when
...
See KT-16768
2022-02-22 22:13:06 +03:00
Dmitriy Novozhilov
6105271d41
[FIR] Make internal declarations from dependsOn dependent modules visible
2022-02-18 17:44:36 +03:00
Dmitriy Novozhilov
ab1ff7baf5
[FIR] Prioritize source dependencies in dependency provider
2022-02-18 17:44:35 +03:00
Mikhail Glukhikh
c1925885fe
Extract ConeTypeSubstitutorByTypeConstructor
2022-02-17 15:04:37 +00:00
Mikhail Glukhikh
6e53dd1a4b
FIR: implement FE1.0-matching ILT approximation during inference
...
#KT-51357 Fixed
2022-02-17 15:04:37 +00:00
Mikhail Glukhikh
6506d35aa6
FIR: add forgotten ConeIntegerLiteralIntersector (relates to KT-51357)
2022-02-17 15:04:36 +00:00
Ivan Kochurkin
5391ee91af
[FIR2IR] Fix incorrect type of typealias for suspend functional type, ^KT-50997 Fixed
2022-02-07 17:21:59 +03:00
Dmitriy Novozhilov
1591518cf6
[FIR] Support constant unary operators for integer literal operators
...
^KT-38895
2022-02-07 13:36:37 +03:00
Dmitriy Novozhilov
52b72a7dac
[FIR] Implement Int -> Long conversions for literals and operators over them
...
^KT-38895
^KT-50996 Fixed
^KT-51000 Fixed
^KT-51003 Fixed
^KT-51018 Fixed
2022-02-07 13:36:36 +03:00
Dmitriy Novozhilov
b980f5ab32
[FIR] Introduce new kind of integer literal types for constant operator calls
2022-02-07 13:36:35 +03:00
Dmitriy Novozhilov
bb5217be72
[FIR] Don't create ILT for integer literal if its value don't fit to Int type
2022-02-07 13:36:34 +03:00
Dmitriy Novozhilov
0bd3e8f418
[FIR] Rename ConeClassErrorType to ConeErrorType, drop ConeKotlinErrorType alias
2022-02-07 13:36:33 +03:00
Dmitriy Novozhilov
84913772ec
[FIR] Drop redundant FirIntegerOperatorCall and number of fir copy methods
2022-02-07 13:36:32 +03:00
Mikhail Glukhikh
11bbd79c4b
FIR: replace ConeKotlinType with more concrete type when possible
2022-02-03 19:12:18 +03:00
Mikhail Glukhikh
d1194e5fd2
FIR: drop some usages of ConeTypeContext
2022-02-03 19:12:17 +03:00
Mikhail Glukhikh
81ff9b820a
FIR: make ConeSimpleKotlinType the only original for definitely not-null
2022-02-03 19:12:16 +03:00
Mikhail Glukhikh
05d65275bf
FIR u/s scope: choose most specific intersection member for override check
...
Before this commit we took just first intersection member for this check.
However it's quite bad, because we were dependent on supertype order.
Choosing the most specific member looks more consistent here.
#KT-50969 Fixed
2022-01-31 21:59:18 +03:00
Dmitriy Novozhilov
6d8b1800e4
[FIR] Extract duplicated code of processing classifiers from intersection scope
2022-01-19 15:24:43 +03:00
Dmitriy Novozhilov
c80cfb0fdb
[FIR] Replace single supertype scope with list of scopes of supertypes in use site scopes
...
This big refactoring is needed to cleanup building of overrides
mappings and prevent creating redundant intersection overrides in
cases when there is no need in them:
```kotlin
interface A {
fun foo()
}
interface B {
fun foo()
}
interface C : A, B {
override fun foo()
}
```
Before this refactoring there was next override tree:
C.foo
intersection override (A.foo, B.foo)
A.foo
B.foo
Also this commit fixes special mapping of overrides in jvm scopes
for declarations which have kotlin builtins in supertypes with
special java mapping rules (collections, for example)
2022-01-19 15:24:43 +03:00
Dmitriy Novozhilov
d588b2e654
[FIR] Add toString to all type scopes
2022-01-19 15:24:43 +03:00
Dmitriy Novozhilov
e4978d8022
[FIR] Move collecting classifiers from type intersection scope to context
2022-01-19 15:24:42 +03:00
Dmitriy Novozhilov
95a95450bf
[FIR] Extract logic of creating intersection overrides into separate class
2022-01-19 15:24:42 +03:00
Dmitriy Novozhilov
5fc1e2e0cb
[FIR] Don't create DNN types for flexible simple types
...
^KT-50788
2022-01-18 13:41:31 +03:00
Dmitriy Novozhilov
57346bac54
[FIR] Properly handle flexible types during creation of DNNT
...
^KT-50788 Fixed
2022-01-17 17:59:22 +03:00
Roman Golyshev
4418d76a0d
FIR: Replace fir.bounds with resolvedBounds where it is appropriate
...
If there is a `coneType` call immediately after the `fir.bounds` call,
it means that the fully resolved type is expected, hence
`resolvedBounds` should be used
2022-01-14 01:04:24 +03:00
Roman Golyshev
5964d8c566
KTIJ-20618 FIR IDE: Enforce resolved type bounds in ConeTypeContext.kt
...
When lazy resolve is involved, type bounds can be in an unresolved
state (e.g. `FirUserTypeRef` instead of `FirResolvedTypeRef`). To
enforce the resolve, we use `resolvedTypeBounds` where it might be
important
^KTIJ-20618 Fixed
2022-01-11 13:56:17 +00:00
Denis.Zharkov
a63351f5d1
FIR: Simplify ConeTypeContext.captureArguments
2022-01-11 16:27:06 +03:00
Denis.Zharkov
9be4f818f4
FIR: Weaken some UPPER_BOUND_VIOLATED restrictions
...
See test data at starProjectionInsteadOutCaptured.kt
^KT-49412 Fixed
^KT-50230 Relates
^KT-48044 Fixed
2022-01-11 16:27:06 +03:00
Denis.Zharkov
1a9c389b0e
FIR: Refactor ConeSubstitutorByMap
...
Add explicit equals and cached hashCode instead of implicit ones from data class
2022-01-11 16:27:04 +03:00
Irene Dea
13bff10567
Fix union related failures.
2022-01-08 15:26:44 +03:00