Dmitriy Novozhilov
1c622a5a3f
[FIR] Add transformConversionTypeRef to FirTypeOperatorCall
2020-07-20 14:38:16 +03:00
Dmitriy Novozhilov
1b78950ebb
[FIR] Don't transform property initializers in type resolve
2020-07-20 14:38:16 +03:00
Dmitriy Novozhilov
9e94189852
[FIR] Add transformTypeParameters to FirTypeParameterRefsOwner
2020-07-20 14:38:15 +03:00
Mikhail Zarechenskiy
4083111dab
Fix SAM conversion when lambda is the last expression of another lambda
...
#KT-39691 Fixed
2020-07-20 14:30:40 +03:00
Mikhail Zarechenskiy
a15d3c76b6
Fix references to sam adapted functions, also fix lookup location
...
#KT-31025 Fixed
2020-07-20 14:30:40 +03:00
Mikhail Zarechenskiy
0c79de1a98
Prohibit adapted reference resolve against reflective types
...
There are design questions about reflection for adapted references,
so the current proposal is to prohibit reflection on them and support
it properly later
#KT-40406 Fixed
2020-07-20 14:30:39 +03:00
Denis Zharkov
cd896ae6c8
FIR: Implement FE 1.0 semantics for super unqualified calls
...
See original logic at org.jetbrains.kotlin.types.expressions.unqualifiedSuper.UnqualifiedSuperKt#resolveUnqualifiedSuperFromExpressionContext
^KT-39070 Fixed
^KT-39599 Related
2020-07-20 12:24:51 +03:00
Denis Zharkov
dfc75f3447
FIR: Support fake elements for light tree
2020-07-20 12:24:27 +03:00
Denis Zharkov
fea1fb0fc3
FIR: Rename FirSourceElement::withKind to fakeElement
...
And reinforce its contract
2020-07-20 12:24:27 +03:00
Denis Zharkov
376d3385d0
FIR: Handle super-receiver case in a special way
...
Before this change, it was resolved independently of containg call
But in fact, the type of `super` depends on the name of the callee
(see KT-39599 and KT-39070)
2020-07-20 12:24:27 +03:00
Jinseong Jeon
628b8b56b7
FIR2IR: convert annotations on type aliases
2020-07-20 09:40:52 +03:00
Jinseong Jeon
4e14f9500f
FIR: account for vararg when creating KFunction type for callable reference
2020-07-20 09:39:34 +03:00
Georgy Bronnikov
c901e82a55
IR: add IrSimpleFunction.isInfix
2020-07-18 11:03:33 +03:00
Mikhail Zarechenskiy
fcf7a55ccc
Fix delegated property resolve on number literals and proper types
...
There is no need to update type of delegate expression if it's already
resolved correctly (doesn't include non-proper types). In almost all
cases it was fine except number literals as there we didn't box
expression in backend and got problems at bytecode verification stage
#KT-40057 Fixed
2020-07-17 14:27:20 +03:00
Mikhail Glukhikh
80022cccd9
[FIR] Introduce & use processOverriddenPropertiesWithDepth
2020-07-17 12:46:02 +03:00
Jinseong Jeon
13ef97e51e
FIR2IR: set proper visibility of backing fields with @JvmField
2020-07-17 12:42:11 +03:00
Jinseong Jeon
f3475fd098
FIR2IR: store and convert annotations on enum entry
2020-07-17 09:48:45 +03:00
Mikhail Glukhikh
026a6ffab2
FirUpperBoundViolatedChecker: code cleanup
2020-07-16 19:09:33 +03:00
Nick
1ea5678932
[FIR] UPPER_BOUND_VIOLATED optimizations
2020-07-16 19:04:29 +03:00
Nick
41a0cfe002
[FIR] Add diagnostic UPPER_BOUND_VIOLATED
2020-07-16 19:04:22 +03:00
Victor Petukhov
e754585e38
NI: add fallback strategy to get lexical scope to checking coroutine call legality
...
^KT-40247 Fixed
^KT-40337 Fixed
2020-07-16 15:33:27 +03:00
vladislavf7@gmail.com
ab2128f55d
[FIR] extended checkers infrastructure refactoring
...
Removed strange way to enable Extended Checkers and add new way to do it
2020-07-16 15:11:32 +03:00
Jinseong Jeon
50f1f8f0eb
FIR: consider more functional types during SAM resolution
2020-07-16 12:56:18 +03:00
Jinseong Jeon
d66c6c7e1e
FIR serializer: transform KSuspendFunction types too
2020-07-16 12:56:18 +03:00
Ivan Kylchik
85e822e283
[FIR] Support smartcast after reference equality check
...
#KT-39000 Fixed
2020-07-16 12:43:55 +03:00
vladislavf7@gmail.com
63f7e95c89
[FIR] Add RedundantExplicitTypeChecker
2020-07-16 12:39:13 +03:00
Jinseong Jeon
c7a37eb6b2
FIR deserializer: load annotations on extension receiver parameters
2020-07-16 10:42:51 +03:00
Mikhail Zarechenskiy
100a6f70ca
Relax rules about inferring to Nothing for special calls
...
#KT-37388 Fixed
#KT-38427 Fixed
#KT-39953 Fixed
#KT-38899 Fixed
2020-07-16 09:56:46 +03:00
Roman Artemev
cd9f59325e
[KLIB] Fix deserialization of anonymous classes
...
In case of initializing property or function with anonymous object the
object is being exposed outside its field/function's scope and
accessible on previous level. In this case in `declarations only` mode
we have unbound symbols. Fix is to force body/initializer loading in
such cases.
Make sure it is deserialized in `declarations'only` mode too.
- Fix KT-40216
- Add test
2020-07-15 18:23:29 +03:00
Victor Petukhov
b0c96a61ec
Don't try to infer postponed variables on lambdas without BuilderInference annotation
...
^KT-39618 Fixed
2020-07-15 16:19:43 +03:00
Jinseong Jeon
30b91b128a
FIR: adjust type of integer operator call as property initializer
2020-07-15 13:56:40 +03:00
Mikhail Glukhikh
ddd26de139
FirTypeIntersectionScope: extract 'createIntersectionOverride'
2020-07-15 13:36:31 +03:00
Mikhail Glukhikh
9934f7d56e
[FIR TEST] Add test for KT-40327
2020-07-15 13:36:31 +03:00
Mikhail Glukhikh
92d40c27e2
FirBasedSignatureComposer: build signature even for private classes
...
FIR2IR assumes that we can build signature for any non-local class.
Later we can drop this assumption.
2020-07-15 13:36:31 +03:00
Mikhail Glukhikh
07b0ffef84
[FIR] Introduce & use remapArgumentsWithVararg
2020-07-15 13:36:30 +03:00
Jinseong Jeon
5c4f978073
FIR: transform arrayOf call with empty arguments
2020-07-15 13:36:30 +03:00
Jinseong Jeon
db9d42c153
IrConstTransformer: handle vararg with spread elements properly
2020-07-15 13:36:30 +03:00
Jinseong Jeon
5600eefea5
FIR: add support for varargs in annotation calls
2020-07-15 13:36:30 +03:00
Jinseong Jeon
4e6bd33eca
FIR: create argument mapping for annotation call in general
2020-07-15 13:36:30 +03:00
Jinseong Jeon
1a861b2df9
FIR2IR: don't create synthetic class for enum entry w/o members
2020-07-15 13:36:30 +03:00
Juan Chen
2ea3579281
[FIR] add support for generic cases of delegation by implementation
...
Add type parameters for generic delegated members and type
substitution when implementing instantiated super interfaces.
2020-07-15 13:36:29 +03:00
Mikhail Glukhikh
93632d2a18
FIR declaration transformer: unwrap synthetic property accessor properly
2020-07-15 13:36:29 +03:00
Mikhail Glukhikh
031f03a903
Introduce FirDeclarationOrigin.INTERSECTION_OVERRIDE
2020-07-15 13:36:29 +03:00
Mikhail Glukhikh
9107944b05
FirSyntheticProperty: take returnTypeRef directly from delegate
2020-07-15 13:36:29 +03:00
Mikhail Glukhikh
e2678149cb
FirClassSubstitutionScope: fix overridden symbols traversing
2020-07-15 13:36:29 +03:00
Mikhail Glukhikh
10a1d5c03b
FirTypeIntersectionScope: add intersection overrides caching
2020-07-15 13:36:28 +03:00
Mikhail Glukhikh
c1d223dbde
FirTypeIntersectionScope: enhance support of inherited default parameters
2020-07-15 13:36:28 +03:00
Mikhail Glukhikh
c46fac3464
FirTypeIntersectionScope: support inherited default parameters
2020-07-15 13:36:28 +03:00
Mikhail Glukhikh
7a2ea49399
FirTypeIntersectionScope: introduce "intersection" fake overrides
2020-07-15 13:36:28 +03:00
Mikhail Glukhikh
5a422b5ef6
FirTypeIntersectionScope: optimize/cleanup processOverriddenFunctions
2020-07-15 13:36:28 +03:00