Mark Punzalan
692a83f7bb
[FIR] Add FirCheckNotNullCall converted to CHECK_NOT_NULL intrinsic
...
function call.
2019-12-11 16:54:15 +03:00
Dmitriy Novozhilov
e281d224a3
[FIR] Fix testdata broken in b76c984b
2019-12-10 12:25:42 +03:00
Dmitriy Novozhilov
b76c984b26
[FIR] Support IntegerLiteralTypes
2019-12-09 17:24:26 +03:00
Dmitry Petrov
89e1941dfd
Update testData for argument nullability assertion tests
2019-12-06 11:03:06 +03:00
Dmitry Petrov
20fb519f1a
PSI2IR: Generate IMPLICIT_NOTNULL casts for platform type values
2019-12-06 11:03:06 +03:00
Dmitriy Novozhilov
38c1a50c1d
[FIR] Resolve delegating constructor calls
2019-12-05 17:47:15 +03:00
Dmitriy Novozhilov
d840671620
[FIR] Don't create delegating super constructor call to kotlin.Enum for enums
2019-12-05 17:47:14 +03:00
Denis Zharkov
e58711cde3
FIR: Select most specific members from supertypes scope
2019-12-05 17:35:33 +03:00
Denis Zharkov
b8984d154b
FIR: Do not copy type parameters from class to constructors
...
Use the same instances from class declaration instead
Otherwise, primary constructor value parameter types when used
in the class body are considered as different from types
based on the class type parameters
See the test genericConstructors.kt, before this commit
"id" call was reported in inapplicable
2019-12-05 13:08:51 +03:00
Denis Zharkov
fa7bd3dd2e
FIR: Support SAM constructors for type aliases
2019-12-03 15:49:22 +03:00
pyos
35c2573b33
PSI2IR: generate IrEnumConstructorCalls with correct return type
...
Normally, the fact that is was Unit was not visible as enum constructors
are lowered to normal class constructors anyway. The exception is when
the arguments are reordered, causing the incorrect return type to leak
into the block that holds temporary variables.
2019-12-03 11:54:41 +03:00
Mikhail Glukhikh
f1eb0dff1f
FIR: disable synthetic scope, make accessor symbols synthetic
...
Before this commit, we had two methods to do generally the same synthetic thing.
It's an attempt to keep only one of them.
Accessor symbols are generated in Java use-site member scopes,
at this place we know better whether we are in Java class or not.
However, we have to do this at every use-site level, which is relatively slow.
Also we could encounter problems when accessor function is overridden in Kotlin,
and accessor symbol can still contain reference to Java accessor.
2019-11-29 18:09:07 +03:00
pyos
fa8cb7b6e0
PSI2IR: support NewInference + SamConversionPerArgument
...
except for SAM conversions of varargs (which aren't implemented in the
non-IR JVM backend either btw)
2019-11-29 15:25:32 +03:00
Dmitry Petrov
cb1b9c2ccf
IR testData: IrSimpleFunction.isOperator
2019-11-29 13:53:05 +03:00
Simon Ogorodnik
dbf0742c00
[FIR] Fix self-type for enum
2019-11-28 17:23:05 +03:00
Mikhail Glukhikh
f58af2e4c3
FIR2IR: fix constructor referencing in return statement
2019-11-28 13:50:10 +03:00
Denis Zharkov
f68929fe74
FIR: Leave functions type parameters in subsituting scope
2019-11-27 11:20:52 +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
Dmitriy Novozhilov
43a8c1282f
[FIR] Add toString() call to expressions in string templates
2019-11-19 13:04:49 +03:00
Dmitriy Novozhilov
d56412e397
[FIR] Analyze lambda arguments in erroneously resolved calls
2019-11-19 10:43: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
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
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
Mikhail Glukhikh
7dee1cd9d2
Build member scope for FirAnonymousObject correctly
2019-10-29 16:27:41 +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