Ilya Chernikov
dfa1e8d03d
FIR: fix findClassRepresentation for dynamic type
...
related to KT-53463 and KT-53464
needed e.g. to find proper (fake) override on calls on dynamic receiver
fixes test js/js.translator/testData/box/dynamic/equals.kt
2022-11-12 16:28:23 +01:00
Mikhail Glukhikh
4dc7b6dddc
K2: fix/universalize logic to determine that member is from Java
2022-11-11 13:30:40 +00:00
Mikhail Glukhikh
08d351db57
K2: unify all importing data logic inside FirAbstractImportingScope
2022-11-11 13:30:39 +00:00
Mikhail Glukhikh
e46978f7b3
K2: simplify visibility check for static qualifiers
2022-11-11 13:30:38 +00:00
Mikhail Glukhikh
3a81174a4c
FIR2IR: support static fake overrides (functions) #KT-53441 Fixed
2022-11-11 13:30:36 +00:00
Mikhail Glukhikh
f070401bb5
K2: fix visibility checks for static overrides via imported from static
...
#KT-53441 In Progress
2022-11-11 13:30:35 +00:00
Mikhail Glukhikh
cc1a094b6c
K2: rename importedFromObject -> importedFromObjectOrStatic
2022-11-11 13:30:34 +00:00
Mikhail Glukhikh
2b2cc07c89
FirObjectImportedCallableScope: fix wrong variable name
2022-11-11 13:30:34 +00:00
Mikhail Glukhikh
d16a4ae647
FirClassSubstitutionScope: partial cleanup
2022-11-11 13:30:33 +00:00
Mikhail Glukhikh
d4fc2248ff
FIR: make class member helper names more consistent
2022-11-11 13:30:32 +00:00
pyos
e2a83a0ed0
FIR: unwrap intersection overrides when looking for owner class
...
But not substitution overrides! This is important if the method called
is an intersection override where one of the intersected types is a
subtype of a generic type.
2022-11-11 13:30:32 +00:00
pyos
9f65c6022c
Move substitution override unwrapping to FirVisibilityChecker
...
This is because it is only needed for the declaration itself, not for
the containing class. Currently there is no difference because
`containingNonLocalClass` will look at the dispatch receiver argument if
one exists anyway, and for substitution/intersection overrides one must
exist.
2022-11-11 13:30:31 +00:00
Yan Zhulanow
48fbb62658
[FE] Add missing 'originalForSubstitutionOverrideAttr' to parameters
...
'originalForSubstitutionOverrideAttr' is supposed to be on all
'SubstitutionOverride' declarations, and certain functionality, such as
'KtFirOverrideInfoProvider#getOriginalOverriddenSymbol()' depends on it.
Absence of the attribute might trigger infinite loop/recursion in
substitution unwrapping.
2022-11-11 11:28:36 +00:00
Ilya Kirillov
4b7cacd55e
[FIR] do not ignore nested type aliases in FirNestedClassifierScope
2022-11-11 12:00:01 +01:00
Ilya Kirillov
ed1751bbc6
[fir] move mutable/base collection pair map do StandardClassIds to further reuse it
2022-11-11 11:59:56 +01:00
Dmitriy Novozhilov
7af43176ce
[FIR] Add optin on API of updating type of receiver values. KT-54708
2022-11-03 08:30:09 +00:00
Dmitriy Novozhilov
22c21ca4df
[FIR] Replace uninferred type variables and stub types during delegate inference
2022-11-03 08:30:07 +00:00
Jinseong Jeon
7f6cad6fb3
FIR: ensure STATUS resolve phase before reading valueClassRepresentation
2022-11-02 18:04:38 +01:00
pyos
7787638737
FIR: fix substitution of anonymous type's supertype again
...
^KT-51418 Fixed
2022-11-01 15:28:41 +00:00
Denis.Zharkov
52eb535a7d
FIR: Use platform specific overridability rules for platform members
...
^KT-54570 Fixed
2022-10-31 14:28:55 +00:00
Denis.Zharkov
c0e0900344
FIR: Preserve K1 behavior for synthetic properties on raw type
...
^KT-54502 Fixed
2022-10-31 14:28:53 +00:00
Denis.Zharkov
80d7404faf
Minor. Reformat TypeUtils.kt
2022-10-31 14:28:51 +00:00
Denis.Zharkov
5cc31114cd
FIR: Support special scope for raw types
...
^KT-46369 Fixed
^KT-41794 Fixed
^KT-49351 Fixed
2022-10-31 14:28:50 +00:00
Dmitriy Novozhilov
b7da00744b
[FIR] Consider overridden getter for setter function for synthetic property
...
^KT-54662 Fixed
2022-10-27 11:08:55 +00:00
Nikolay Lunyak
7e323f8ac6
[FIR] KT-54692: Fix compiler crash on UInt.shl
...
Merge-request: KT-MR-7513
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2022-10-27 10:40:06 +00:00
Dmitriy Novozhilov
8fbb605034
[FIR] Rename containingClass function to containingClassLookupTag
...
Since this function returns lookup tag instead of FirClass or symbol
the old name may lead to misunderstanding
2022-10-19 11:09:34 +00:00
Dmitriy Novozhilov
be3f8e7eb0
[FIR] Remove redundant opt-ins to ExperimentalStdlibApi in FIR modules
2022-10-19 11:09:33 +00:00
Dmitriy Novozhilov
64e21af03b
[FIR] Consider containing class during visibility check of static function call
...
^KT-53441
2022-10-19 11:09:32 +00:00
pyos
8f237a60f7
Minor: make a convoluted condition even more readable
2022-10-14 08:25:28 +00:00
pyos
9a151e1422
Minor: remove unused FirOverrideService methods
2022-10-14 08:25:28 +00:00
pyos
8f19291a35
Minor: clean up FirTypeIntersectionScopeContext a bit more
2022-10-14 08:25:27 +00:00
pyos
1c2e25d727
FIR: move a condition to make it hopefully a bit clearer
...
A non-trivial intersection override should be created if:
1. the base methods are from different classes (for proper reporting of
diagnostics if an override is necessary);
2. OR the return type might need to be intersected (which currently
happens for non-subtyping scopes if there is no single maximally
specific declaration)
2022-10-14 08:25:27 +00:00
pyos
ee921412fc
FIR: intersect return types of declarations in intersection scopes
...
^KT-54378 Fixed
2022-10-14 08:25:26 +00:00
pyos
2879e7a74c
FIR: support > 1 most specific members in type intersection scopes
2022-10-14 08:25:26 +00:00
pyos
35450e6e04
FIR: refactor FirOverrideService to get a list of most specific members
...
There may be several if neither of them returns a subtype of the other's
returned type.
2022-10-14 08:25:25 +00:00
Ivan Kochurkin
69ee40325b
[FIR] Fix dependencyProviders generation in FirDependenciesSymbolProviderImpl
...
Get rid of unnecessary creating of FirCompositeSymbolProvider
2022-10-13 18:11:49 +00:00
Ivan Kochurkin
4d89eddbe8
[FIR] Don't create FirDependenciesSymbolProvider without need
2022-10-13 18:11:47 +00:00
Ivan Kochurkin
9c6df5313a
[FIR] Fix substitution of anonymous type's supertypes, ^KT-51418 Fixed
2022-10-13 18:11:47 +00:00
Nikolay Lunyak
b6f950ed75
[FIR][FE 1.0] KT-47933: Warn about redundant @Repeatable
...
Merge-request: KT-MR-7318
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2022-10-07 13:33:49 +00:00
Dmitriy Novozhilov
1cd4f3ad2f
[FIR] Get rid of all usages of cast in FIR modules
2022-10-06 06:57:06 +00:00
Dmitriy Novozhilov
ee21c966e1
[FIR] Get rid of all usages of safeAs in FIR modules
2022-10-06 06:57:06 +00:00
Dmitriy Novozhilov
6623456d2a
[FIR] Properly support @JvmRecord
...
^KT-53867 Fixed
2022-10-03 15:48:17 +03:00
Dmitriy Novozhilov
c0ad67c4f9
[FIR] Generate java declarations for record components of java records
...
^KT-53964 Fixed
2022-10-03 15:48:17 +03:00
Mikhail Glukhikh
f68f06a93f
FIR visibility checker: remove redundant session from isVisibleForOverriding
2022-09-29 08:34:14 +00:00
Mikhail Glukhikh
bcd7a531b9
K2: filter invisible overridden in status resolver & FIR2IR
...
Related to KT-53197
2022-09-29 08:34:13 +00:00
pyos
3a5d75fd22
K2: introduce platform-specific visibility checks for overrides + tests
...
Related to KT-53197
2022-09-29 08:34:13 +00:00
Simon Ogorodnik
8bdb8ba232
K2: Fix type-alias expansion during suspend function type serialization
...
When suspend function type is serialized, there is special logic that
adds Continuation parameter, before doing so, type-aliases has to be
expanded, attributes for resulting type should also derive from
expanded type
KT-53193, KT-54062
2022-09-16 20:42:03 +00:00
pyos
be5c4a91a4
FIR/FE1.0: keep flexibility when approximating local types
2022-09-14 08:11:04 +00:00
pyos
062308c7c1
FIR: keep nullability when approximating local types
...
^KT-30054 Open
2022-09-14 08:11:04 +00:00
pyos
acce055fc4
FIR: fix incorrect handling of suspend function typealiases again
...
The previous attempt stopped this code from throwing an exception during
serialization, but the arity is still wrong so an exception is now throw
when reading the serialized type.
^KT-50997 Fixed
2022-09-12 17:45:40 +02:00