Denis Zharkov
3b7ad066fc
FIR: Substitute type alias constructors properly
2019-11-27 11:20:52 +03:00
Denis Zharkov
f68929fe74
FIR: Leave functions type parameters in subsituting scope
2019-11-27 11:20:52 +03:00
Jiaxiang Chen
0441e484a6
PSI2IR: For implicit function return, use expression's end offset as start offset of the IrReturn to generarate correct line number.
2019-11-26 17:59:28 +03:00
Dmitriy Novozhilov
43e621530f
[FIR] Add type parameters to FirQualifierExpression
...
It is needed for resolving qualifiers with type arguments
like `Array<String>::class`
2019-11-25 14:44:44 +03:00
Mark Punzalan
5afab1ac2b
[FIR] FIR2IR: Populate calls with type arguments and function type
...
parameters with bounds/supertypes.
2019-11-25 09:37:47 +03:00
Mikhail Glukhikh
d39a36ee25
FIR declared member scope: remove constructors from callable index
...
This removes constructor resolve ambiguity in some cases.
Now constructors are resolved only via classifiers
2019-11-19 22:41:17 +03:00
Mikhail Glukhikh
bd71d1dc3f
FIR resolve: use lazy nested classifier scopes for Java classes
...
It's necessary because JavaSymbolProvider adds nested classifiers lazily.
Commit slows things down due to relatively slow search in symbol providers
2019-11-19 22:40:22 +03:00
Dmitriy Novozhilov
43a8c1282f
[FIR] Add toString() call to expressions in string templates
2019-11-19 13:04:49 +03:00
Dmitriy Novozhilov
ac590fa4c9
[FIR] Fix deserializing nullability of type parameters
2019-11-19 10:43:46 +03:00
Dmitriy Novozhilov
950d1f4fe4
[FIR] Fix enhancement of java array type
2019-11-19 10:43:46 +03:00
Dmitriy Novozhilov
d56412e397
[FIR] Analyze lambda arguments in erroneously resolved calls
2019-11-19 10:43:46 +03:00
Dmitriy Novozhilov
35dd1cf75a
[FIR] Fix binding return expression to function
2019-11-19 10:43:46 +03:00
Mikhail Glukhikh
63f38bb28a
FIR [rendering only]: render fake overrides for properties
2019-11-14 19:10:58 +03:00
Dmitriy Novozhilov
660bcce90a
[FIR] Add smartcasts for reassigned vars
2019-11-14 18:33:46 +03:00
Dmitriy Novozhilov
2a74e37e28
[FIR] Ignore expected type for resolve constant expressions
2019-11-14 18:33:46 +03:00
Roman Artemev
a343a57207
[IR] Refactor ir infrastructure
...
- Remove range-based uniq id indexes using to link built ins
- Limit KotlinType usages, replace them with corresponding IrType
2019-11-12 20:45:11 +03:00
Mikhail Glukhikh
e96aeb77a6
FIR visibility check: support private class members
2019-11-12 11:24:25 +03:00
Alexander Udalov
57a674e9e6
Make fast class files reading mode default in compiler tests
...
This makes sense because this mode is the default in the production
compiler. Forgetting to enable it where necessary led to different
bizarre test failures, see for example changes around 3fee84b966 and
KT-34826
2019-11-11 15:40:49 +01:00
Mikhail Glukhikh
26281bfe89
FIR Java: use different names for anonymous parameters (p0, p1, p2, ...)
2019-11-11 17:07:57 +03:00
Dmitriy Novozhilov
b5210e6a9b
[FIR] Fix building fir for += with complex rhs
...
Also fix choosing candidate for assignment operator call
2019-11-08 12:12:38 +03:00
Dmitriy Novozhilov
cadc2dfe4d
[FIR] Fix generating fir for invoke calls
2019-11-08 12:12:38 +03:00
Mikhail Glukhikh
48938a20a7
Raw FIR: add synthesized Enum.valueOf() function
2019-11-08 09:58:02 +03:00
Mikhail Glukhikh
581504aac5
Raw FIR: add synthesized Enum.values() function #KT-24076 Fixed
2019-11-07 09:29:00 +03:00
Mikhail Glukhikh
bd1127cfa3
FIR: resolve lambda arguments even if an outer call is unresolved
2019-11-06 13:19:20 +03:00
Mikhail Glukhikh
60e6d2e521
Resolve local declaration statuses & types inside bodies in FirBodyResolveTransformer
2019-11-06 13:19:10 +03:00
Dmitriy Novozhilov
010dae454e
[FIR] Fix extracting parameters from extension function types
2019-11-05 15:22:23 +03:00
Steven Schäfer
704e6e96fa
Fir2Ir: Produce IR_TEMPORARY_VARIABLE origins
2019-11-05 14:58:47 +03:00
Steven Schäfer
733c7579aa
Normalize names of temporary variables in IrTextTests
2019-11-05 14:58:47 +03:00
Dmitry Petrov
1e63101a27
FIR2IR: fix testData after rebase
2019-11-01 14:55:12 +03:00
Dmitry Petrov
6cde86139c
IR: isFakeOverride: fix testData after rebase
2019-11-01 14:55:11 +03:00
Dmitry Petrov
edaa42ea46
IR: IrField.isFakeOverride
2019-11-01 14:55:10 +03:00
Dmitry Petrov
82c527c2cc
IR: IrProperty.isFakeOverride
2019-11-01 14:55:10 +03:00
Dmitry Petrov
2682057767
IR tests: update testData for IrSimpleFunction.isFakeOverride
2019-11-01 14:55:09 +03:00
Dmitry Petrov
843fb88459
IR: IrSimpleFunction.isFakeOverride
2019-11-01 14:55:09 +03:00
Dmitriy Novozhilov
073578bf1c
[FIR] Fix Fir2Ir testdata broken in a501e514
2019-11-01 11:07:16 +03:00
Dmitry Petrov
8b2fdca706
FIR2IR: fix testData
2019-10-31 11:13:45 +03:00
Steven Schäfer
af74fd047a
psi2ir: Consistently use type unit for statements
...
These changes allow us to accurately distinguish between statements and
expressions in the IR.
This also fixes the types of non-exhaustive conditional statements.
2019-10-31 11:13:44 +03:00
Steven Schäfer
0da4b06074
psi2ir: Fix return insertion
...
We should only insert a return statement at the end of a lambda or
function if the final statement is used as an expression (slice
USED_AS_RESULT_OF_LAMBDA and USED_AS_EXPRESSION).
2019-10-31 11:13:44 +03:00
Dmitriy Novozhilov
36ad065792
[FIR] Fix testdata broken after d2b895d8
2019-10-30 18:49:07 +03:00
Mikhail Glukhikh
d4af35d794
FIR: add substitution for Java fields
2019-10-30 12:55:37 +03:00
Mikhail Glukhikh
384134a069
FIR2IR: fix handling constructors & their symbols (related also to local classes)
2019-10-29 16:27:41 +03:00
Mikhail Glukhikh
7dee1cd9d2
Build member scope for FirAnonymousObject correctly
2019-10-29 16:27:41 +03:00
Mikhail Glukhikh
a13ae08b52
FIR: add classifiers to local scopes, process local class symbols correctly
2019-10-29 16:27:40 +03:00
Dmitriy Novozhilov
3658bee253
[FIR] Fix testdata related to callable references
2019-10-29 13:03:13 +03:00
Dmitriy Novozhilov
b93357be48
[FIR] Support assignment operators
2019-10-29 13:03:13 +03:00
Denis Zharkov
ea43d2880c
FIR: Update FIR2IR test data changed because of callable references
...
^KT-32725 Fixed
2019-10-28 17:07:26 +03:00
Steven Schäfer
210c354ae5
Fir2Ir: Set initializers for temporary variables
2019-10-25 14:27:19 +03:00
Dmitry Petrov
eebb071ae9
KT-34509 Properly unwrap callable reference descriptor
...
NB there's a problem with callable references to SAM constructors,
see also KT-16789
2019-10-22 12:30:15 +03:00
Dmitry Petrov
1d229b6dca
FIR2IR: isExpect
2019-10-21 13:04:59 +03:00
Dmitry Petrov
6532f29cc6
IR: isExpect
2019-10-21 13:04:59 +03:00