Jinseong Jeon
efeabac2c5
FIR: do not force coercion-to-Unit for nullable lambda return type
...
3d7d87ac should have been implemented as aafe41c did.
2020-12-15 17:52:49 +03:00
Jinseong Jeon
6239301f4e
FIR: no constraint for coerced-to-Unit last expression of lambda
2020-12-15 17:52:49 +03:00
Jinseong Jeon
4ab0897d7d
FIR: pass the explicit expected type to block type
...
This helps avoid adding redundant return Unit into block.
2020-12-15 17:52:48 +03:00
Ilya Kirillov
2201dd5198
FIR: make FirSyntheticPropertiesScope to be name aware
2020-12-12 12:26:56 +01:00
Jinseong Jeon
8f2ad57f7a
FIR: pass elvis expected type to lhs/rhs
2020-12-10 20:52:49 +03:00
pyos
12f936f6b7
FIR2IR: do not approximate reified type arguments to super class
2020-12-10 20:52:46 +03:00
Mikhail Glukhikh
6d545fc281
Make FirTowerLevel an abstract class
2020-12-10 15:29:46 +03:00
Mikhail Glukhikh
34d7a7c184
FIR tower levels: inline processElementsByName[AndStoreResult]
2020-12-10 15:29:46 +03:00
Mikhail Glukhikh
af4941b222
[FIR] Drop delayedNode from ControlFlowGraph.orderNodes
2020-12-10 15:29:45 +03:00
Mikhail Glukhikh
7e99f0ee23
Optimize ConeInferenceContext.typeDepth a bit
2020-12-10 15:29:44 +03:00
Mikhail Glukhikh
67c7b5ca0a
Optimize/simplify FirAbstractImportingScope.getStaticsScope
2020-12-10 15:29:44 +03:00
Mikhail Glukhikh
d90cc452fe
Simplify: FirSymbolProvider.getClassDeclaredPropertySymbols
2020-12-10 15:29:44 +03:00
Mikhail Glukhikh
bb0410b143
[FIR] Drop unused utility functions from StandardTypes.kt
2020-12-10 15:29:43 +03:00
Mikhail Glukhikh
5daa406cdf
Use FirNamedFunctionSymbol in FirScope.processFunctionsByName
2020-12-09 19:53:27 +03:00
Jinseong Jeon
2dfba10d84
FIR: extend suspend conversion to intersection type
2020-12-09 19:53:25 +03:00
Mikhail Glukhikh
42ea4463ee
Fix type argument inconsistency in FirResolvedQualifier
2020-12-09 19:53:24 +03:00
Mikhail Glukhikh
91834ccf46
Use FirNamedFunctionSymbol in FirSimpleFunction & its inheritors
2020-12-09 19:53:19 +03:00
Mikhail Glukhikh
15021f30ff
Use FirNamedFunctionSymbol around processOverriddenFunctions
2020-12-09 19:53:18 +03:00
Jinseong Jeon
cdfe1771d9
FIR DFA: reimplement type OR operation to its original semantics
...
#KT-43569 Fixed
2020-12-07 10:50:19 +03:00
Jinseong Jeon
16b9312695
FIR DFA: refactor type statements manipulation
2020-12-07 10:50:19 +03:00
Jinseong Jeon
3d7d87ace5
FIR: keep nullability of lambda return type
2020-12-05 12:25:50 +03:00
Mikhail Glukhikh
4626f21c58
Record type arguments for FirResolvedQualifier
2020-12-03 19:33:51 +03:00
Mikhail Glukhikh
2429f429c5
[FIR] Set isStubTypeEqualsToAnything = true for inference as in FE 1.0
...
#KT-43616 Fixed
2020-12-02 14:49:08 +03:00
pyos
50ae360ff9
FIR2IR: fix the way annotations are moved to fields
...
1. When an annotation has multiple targets, the priority goes like this:
constructor parameter (if applicable) -> property -> backing field.
2. The argument to `kotlin.annotation.Target` is a vararg, so that
should be handled as well.
3. `AnnotationTarget.VALUE_PARAMETER` allows receivers, constructor
parameters, and setter parameters, while `AnnotationTarget.FIELD` allows
both backing fields and delegates.
Known issue: java.lang.annotation.Target is not remapped to the Kotlin
equivalent, so things are still broken for pure Java annotations.
2020-11-30 20:29:18 +03:00
Mikhail Glukhikh
0a0b5b5d2b
[FIR DFA] Don't consider anonymous object as stable initializer to bind
...
#KT-43332 Fixed
2020-11-26 16:29:06 +03:00
Mikhail Glukhikh
1dc897346c
[FIR] Fix WRONG_IMPLIES_CONDITION problem in DFA model
2020-11-26 16:28:56 +03:00
Mikhail Glukhikh
c602ccb33e
Create FIR fake source element for vararg argument expression
2020-11-26 08:37:47 +03:00
pyos
7327c20200
FIR: add a resolution mode for property delegates
...
Like function arguments, they are context-dependent, but unlike function
arguments, callable references should be resolved eagerly as if they are
explicit receivers.
2020-11-25 16:55:10 +03:00
Jinseong Jeon
0a5b899aab
FIR: more comprehensive substitution of stub types after builder inference
2020-11-25 16:55:09 +03:00
Jinseong Jeon
30c97e6cb4
FIR: update unsubstituted return types in builder
...
#KT-43340 Fixed
2020-11-25 16:55:09 +03:00
Jinseong Jeon
a0dd62f8c5
Remove unnecessary expression
2020-11-25 16:55:09 +03:00
Ilya Kirillov
c4a8d1c3a1
FIR: use java functional interface as a source of sam function call
2020-11-23 15:31:31 +01:00
Jinseong Jeon
67604551c5
FIR: reuse visibility checker when determining immutable property reference
2020-11-20 10:48:13 +03:00
Jinseong Jeon
463d53ee5c
FIR: handle reference to property with invisible setter
2020-11-20 10:48:13 +03:00
Jinseong Jeon
fc7f589caa
FIR Java: record Java types with flexible nullability
2020-11-18 13:06:46 +03:00
Denis Zharkov
14305d1eba
FIR: Simplify callable references resolution
...
Also that fixes some bugs
2020-11-16 15:50:39 +03:00
Denis Zharkov
ad35723f56
FIR: Simplify super-qualified calls resolution
2020-11-16 15:50:39 +03:00
Denis Zharkov
d4c7d4fc7c
FIR: Fix callable references resolution with stub receivers
...
Use stubReceiver as a receiver for fake calls
See issues KT-43358 KT-43359 KT-43378
2020-11-16 15:50:39 +03:00
Denis Zharkov
f97cc0b62d
FIR: Rework receivers processing in resolution
...
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity)
- Split CheckReceiver (dispatch part should only check nullability)
2020-11-16 15:50:39 +03:00
Denis Zharkov
e2099a0307
FIR: Fix false-positive successful resolution of call with lambda receiver
...
Do not try to integrate/postpone receiver expression to the base system
Receiver should be resolved independently anyway
2020-11-16 15:50:39 +03:00
Denis Zharkov
396e799e5d
FIR: Fix resolution for type-alias based SAM
2020-11-16 15:50:39 +03:00
Dmitriy Novozhilov
3aa8b09e31
[FIR] Add configurable language version settings to FirSessionFactories
2020-11-13 16:19:29 +03:00
Dmitriy Novozhilov
15cc979378
[FIR] Add enter contract node as exit for exceptional path to avoid compiler crashing
...
This fixes crashing test
`FirDiagnosticsTestSpecGenerated.NotLinked.Contracts.Declarations.ContractBuilder.Common.Neg.test17`
2020-11-12 14:46:39 +03:00
Dmitriy Novozhilov
87380d1913
[FIR] Don't assume that exit lambda node is target for exceptional exit for inplace lambdas
...
#KT-39709 Fixed
#KT-43156 Fixed
2020-11-12 14:46:38 +03:00
Jinseong Jeon
440cf78884
FIR CFG: add more uncaught exception paths
2020-11-12 14:46:37 +03:00
Dmitriy Novozhilov
f4347a60c2
[FIR] Fix typo
2020-11-12 14:46:35 +03:00
Mikhail Glukhikh
3c48f2eb68
[FIR] Handle isProp/setProp synthetic pair properly in Java use-site scope
2020-11-12 13:37:38 +03:00
Mikhail Glukhikh
fb961f7070
[FIR] Copy also synthetic setter during fake override generation
2020-11-12 13:37:37 +03:00
Mikhail Glukhikh
92840b8ec5
FirTypeIntersectionScope: fix typo in name
2020-11-12 13:37:35 +03:00
Mikhail Glukhikh
5b947144d4
FirTypeIntersectionScope: don't create in no-supertypes situation
2020-11-12 13:37:35 +03:00