Dmitriy Novozhilov
da0fd7cc15
[FIR2IR] Approximate non-denotable types when converting ConeType to IrType
2021-03-02 19:11:21 +03:00
Dmitriy Novozhilov
af79265f42
[FIR] Fix creating overrides for functions with name same as renamed in JVM builtins
2021-03-02 19:11:15 +03:00
Anton Bannykh
b0e0e62c0b
Propagate isExternal flag in Psi2Ir and deserializer
2021-03-02 14:30:16 +03:00
Denis.Zharkov
4fffe7b9c8
FIR: Fix VerifyError caused by private delegates
...
^KT-45048 Fixed
2021-02-25 19:30:15 +03:00
Dmitriy Novozhilov
ea2783eace
[FIR] Fix generating this reference in delegated accessors
...
There was a problem with delegated extension property with dispatch
receiver that `this` in `getValue` call was set to dispatch receiver
instead of extension one
2021-02-20 18:27:43 +03:00
Denis.Zharkov
377a0aa237
FIR2IR: Adjust test data for updated overridden structure
2021-02-20 10:59:22 +03:00
Dmitriy Novozhilov
469252f6b4
[FIR] Don't create smartcast node if smartcasted type is equal to original type
2021-02-20 10:23:33 +03:00
Mikhail Glukhikh
357a7907a3
FIR: fix type approximation by visibility
2021-02-19 10:39:57 +03:00
Dmitry Petrov
744a0fcd25
PSI2IR KT-45022 object in LHS of compound assignment
2021-02-18 20:24:16 +03:00
Dmitriy Novozhilov
d4c26cca52
[FIR] Use type without smartcast for local variable with smartcasted initializer
2021-02-16 17:51:32 +03:00
Mikhail Glukhikh
fa0f967c83
FIR2IR: support adapted references for constructors
2021-02-15 17:08:13 +03:00
Mikhail Glukhikh
8bab208322
FIR2IR: use information about callable reference adaptation from resolve
2021-02-15 17:08:08 +03:00
Dmitriy Novozhilov
2d5b685535
[FIR] Fix processing constructors of sealed classes
...
- Allow declaring protected constructors in sealed classes
- Make default visibility of sealed class constructor `protected`
KT-44861
KT-44865
2021-02-12 13:36:41 +03:00
Dmitriy Novozhilov
f3a8fcaea6
[FE] Make constructors of sealed classes protected instead of internal
2021-02-12 13:36:38 +03:00
Mikhail Glukhikh
4bc630d82c
FIR2IR: enhance approximation of captured types
2021-02-11 11:48:34 +03:00
Mikhail Glukhikh
346ffb3acf
FIR2IR: support substitution for SAM types
2021-02-11 11:48:34 +03:00
Mikhail Glukhikh
7050af9b79
FIR2IR: use invariant projections for SAM_CONVERSION types
2021-02-11 11:48:34 +03:00
Mikhail Glukhikh
d4b0688690
FIR: introduce delegate field initializers
...
Before this commit we initialized delegate fields in primary constructor,
that could provoke NPE in case delegate is used in initializer of
some property backing field.
Now we initialize delegate fields directly instead.
2021-02-08 14:28:27 +03:00
Mikhail Glukhikh
694d69fbfa
FIR2IR: select return target inside accessor properly
2021-02-08 14:28:24 +03:00
pyos
64c5608f31
FIR: expect nullable type for elvis LHS
2021-02-08 13:00:22 +03:00
Igor Chevdar
bb8bf28b8b
[PSI2IR] Set reflectionTarget for all adapted references
2021-02-03 15:26:40 +05:00
Mikhail Glukhikh
465261e611
FIR: don't create intersection override for duplicating symbols
2021-02-02 16:25:08 +03:00
Denis.Zharkov
1e0d9f4075
FIR2IR: Do not add implicit casts for types with different nullability
...
For smart casts, elvises, etc., there are no implicit casts in psi2fir
in changed test data
2021-01-29 10:50:22 +03:00
Denis.Zharkov
5c62ee4ba8
FIR2IR: Fix complex cases of smart cast expressions used as dispatch receiver
...
It might be not only <ExpressionWithSmartCast>(a).foo(), but also
id(<ExpressionWithSmartCast>(a)).foo() and many other cases
2021-01-29 10:50:22 +03:00
Victor Petukhov
af3eaf5d71
Add explicit disabling ProhibitVarargAsArrayAfterSamArgument feature in tests as it's enabled by default in 1.5
2021-01-28 13:19:31 +03:00
Dmitriy Novozhilov
ee1aff1012
[Test] Update different testdata according to changes in sealed classes
2021-01-28 13:19:29 +03:00
Mikhail Glukhikh
ce1f9882df
FIR2IR: Fix mapping for intersection overrides of deserialized functions
2021-01-27 15:42:04 +03:00
Mikhail Glukhikh
1a4b327210
FIR2IR: fix smart casts in case field is accessed
2021-01-26 12:27:09 +03:00
Mikhail Glukhikh
1c9064836e
FIR2IR: fix intersection type smart cast when synthetic property accessed
2021-01-26 12:26:50 +03:00
Denis.Zharkov
3a3d2ee3e9
FIR2IR: Fix mapping for intersection overrides of deserialized properties
2021-01-25 12:29:31 +03:00
Mikhail Glukhikh
9e5c9efadf
FIR2IR: don't generate IrGetObject for anonymous objects
2021-01-23 10:56:36 +03:00
Mikhail Glukhikh
06ee768c6a
FIR: in case of smart cast, use original type for FirThisRcvrExpression
...
Before this commit, we used type after smart cast both for original
FirThisReceiverExpression and for wrapping FirExpressionWithSmartCast.
However, this makes FIR2IR implicit cast generator work incorrectly
(it decides not to insert implicit cast because original type is the same).
After this commit, expressions have different types and implicit cast
generator works properly.
2021-01-23 10:56:34 +03:00
Mikhail Glukhikh
4fd4f504d0
FIR: make componentX functions operator
2021-01-22 18:11:57 +03:00
Dmitriy Novozhilov
b9e9620ab5
[TD] Unmute passing Fir2Ir text test
2021-01-22 13:51:32 +03:00
Dmitriy Novozhilov
842ed624a7
[TD] Remove some outdated dumps in FIR_IDENTICAL tests
2021-01-22 13:51:31 +03:00
Dmitriy Novozhilov
77115cea92
[TD] Union ir dumps of different test files
2021-01-22 13:51:30 +03:00
Dmitriy Novozhilov
4752924b13
[TD] Update FQN's in testdata of IR text tests
2021-01-22 13:51:29 +03:00
Dmitriy Novozhilov
8286a160bd
[TD] Update order of directives
2021-01-22 13:51:27 +03:00
Dmitriy Novozhilov
aba029237d
[Test] Add handler for comparing pretty kt ir dumps
2021-01-22 13:51:25 +03:00
Denis.Zharkov
b0b7f39c75
FIR: Do not use return statement for type of a block expression
...
Type of a block is a kind of irrelevant for lambdas: their type is much
more complicated and defined via FirDataFlowAnalyzer#returnExpressionsOfAnonymousFunction
at at FirCallCompleter.LambdaAnalyzerImpl#analyzeAndGetLambdaReturnArguments
2021-01-21 18:53:03 +03:00
Mikhail Glukhikh
6cee4e968e
[FIR] Don't call componentX for anonymous destructuring entry
2021-01-18 08:28:15 +03:00
Mads Ager
dfc86feecd
[IR] Extend test coverage for smart cast handling.
2021-01-11 12:01:48 +03:00
Mads Ager
6fc0de39c2
[PSI2IR] Propagate smart cast information for variable loads.
...
This gives us more precise type information and can enable backend
optimizations. This was motivated by when expressions not compiled
to table switches in the JVM_IR backend.
Fixed KT-36845.
2021-01-11 12:01:47 +03:00
Roman Artemev
826985450e
Add test for KT-42036
2020-12-29 16:27:31 +03:00
Victor Petukhov
07b6f0d871
Fix failing tests
2020-12-25 14:29:11 +03:00
Mikhail Glukhikh
0d40fde713
FIR synthetics: make setter subtype check more precise #KT-43347 Fixed
2020-12-25 14:07:28 +03:00
Victor Petukhov
954c9cecca
Compute type for callable references and lambdas inside not null assertion if couldn't get already recorded type
2020-12-25 11:52:59 +03:00
Dmitry Petrov
4e261cc358
JVM_IR KT-24258 fix NPE message for delegated properties
2020-12-23 21:50:10 +03:00
Dmitry Petrov
0841a6b0ea
irText tests for KT-19306
2020-12-23 21:50:06 +03:00
Georgy Bronnikov
b35d4134a7
Psi2IR: workaround for IR-based descriptors
...
Since KotlinTypes involving IR-Based descriptors are distinct from KotlinTypes
involving original descriptors of the same declarations, subtyping check
breaks in InsertImplicitCasts.
2020-12-23 18:50:53 +03:00