Zalim Bashorov
a5b224fda1
[IR] add new testdata after rebase
2020-11-26 00:14:07 +03:00
Zalim Bashorov
3b1a6389ab
[IR] update testdata after rebase
2020-11-26 00:14:06 +03:00
Zalim Bashorov
8d5facb15f
[IR] add testdata for dumpKotlinLike
2020-11-26 00:14:03 +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
dfc5059d6b
FIR: reproduce KT-43340
2020-11-25 16:55:08 +03:00
Jinseong Jeon
eff4cec3e0
FIR2IR: convert annotations on delegated members
2020-11-23 19:36:10 +03:00
Jinseong Jeon
463d53ee5c
FIR: handle reference to property with invisible setter
2020-11-20 10:48:13 +03:00
Dmitry Petrov
e17158d961
JVM_IR KT-42758 don't use 'this' for object self-reference by name
2020-11-19 16:34:04 +03:00
Kristoffer Andersen
5967e8295e
[IR] Align captured receiver variable naming with old BE
2020-11-18 15:18:10 +01:00
Jinseong Jeon
9a99af53ba
FIR JVM: correct signature conversion for array
...
#KT-43339 Fixed
2020-11-18 13:06:51 +03:00
Jinseong Jeon
5c61079d75
FIR: reproduce KT-43339 (Throwable.stackTrace)
2020-11-18 13:06:49 +03:00
Jinseong Jeon
4cb32cd38a
FIR2IR: add implicit NOT_NULL cast for @FlexibleNullability type
2020-11-18 13:06:48 +03:00
Jinseong Jeon
fc7f589caa
FIR Java: record Java types with flexible nullability
2020-11-18 13:06:46 +03:00
Dmitry Petrov
a27c6b77cf
KT-43370 ACC_DEPRECATED on property accessors implemented by delegation
2020-11-17 18:16:37 +03:00
Jinseong Jeon
cb77b76c0d
FIR2IR: convert recursive captured type properly
...
#KT-43346 Fixed
2020-11-16 15:14:24 +03:00
Mikhail Glukhikh
d4f08018ce
[FIR2IR] Extract special symbol provider to make JVM extension
2020-11-10 21:07:27 +03:00
Mikhail Glukhikh
bc47a30dd3
[FIR] Handle 'EnhancedNullability' more properly
...
This commit includes three changes:
1. 'EnhancedNullability' is no more set for declaration types
2. It is no more used for conversion types in translator
3. Translator inserts implicit not-null cast only when enhanced type is cast to not-null type.
2020-11-10 21:07:27 +03:00
Mikhail Glukhikh
e7a84fd1ee
[FIR2IR] Preserve 'EnhancedNullability' type annotation in IR
2020-11-10 21:07:26 +03:00
Denis Zharkov
233bb47b99
FIR: Fix SAM conversion for raw types with non-trivial TP upper bounds
2020-11-10 14:26:54 +03:00
Dmitry Petrov
b9c6267a63
KT-43217 Encode @EnhancedNullability types in IdSignature
2020-11-09 15:20:46 +03:00
Denis Zharkov
7b48625b58
FIR: Remove FirCallableSymbol::overriddenSymbol
2020-11-06 14:44:27 +03:00
Denis Zharkov
4612f26bfb
FIR: Add workaround for OverloadResolutionByLambdaReturnType
...
Mostly, that should help for existing flatMap usages
^KT-43129 Submitted
2020-11-03 18:30:15 +03:00
Dmitry Petrov
e4ba787034
JVM_IR KT-43066 Generate 'clone' in class implementing kotlin.Cloneable
2020-10-30 19:03:31 +03:00
Mikhail Glukhikh
7b4f781ea8
[FIR] Split primary constructor parameter scope into two different
...
In init block or property initializers,
for `val x` declared in primary constructor,
`x` reference is now resolved to property, not to parameter.
So we need two different scopes for primary constructor,
one for 'pure' parameters and another one for all parameters,
including val/var ones.
#KT-42844 Fixed
2020-10-30 18:44:55 +03:00
Dmitry Petrov
08b761ae7a
PSI2IR don't copy annotations for properties implemented by delegation
...
KT-43012
2020-10-29 16:23:02 +03:00
Mikhail Glukhikh
4a3a2ef72a
[FIR2IR] Test data fix after rebase (regular + delegated supertype)
2020-10-28 18:09:13 +03:00
Mikhail Glukhikh
60141ccbaa
[FIR] Fix Substitution scope key to avoid accidental matches
2020-10-28 18:09:12 +03:00
Mikhail Glukhikh
2dc6467b5d
[FIR] Modify signatures also from ERASED_COLLECTION_PARAMETER_SIGNATURES
...
In this commit we change value parameter type of containsAll, removeAll,
retainAll from Java collections. Originally it's Collection<?>,
we change it to Collection<T>
#KT-42340 Fixed
2020-10-28 18:09:11 +03:00
Jinseong Jeon
2424f2438c
FIR2IR: towards comprehensive visits in implicit cast inserter
2020-10-28 15:44:45 +03:00
Jinseong Jeon
707e94bab5
FIR2IR: add test about coercion-to-Unit for nested when
2020-10-28 15:44:41 +03:00
Mikhail Glukhikh
ef6b643b9c
[FIR2IR] Don't set WHILE_LOOP origin for blocks
2020-10-28 15:44:36 +03:00
Denis Zharkov
2589de6c49
FIR: Refine delegated members introduced to use-site scope
...
- Do not add hashCode/equals/toString
- Do not add privates and ones that are already declared
2020-10-28 11:43:25 +03:00
Denis Zharkov
2bdb21793f
FIR: Adjust test data
2020-10-28 11:43:25 +03:00
Mikhail Glukhikh
09043fb98d
[FIR] JvmMappedScope: add mutable methods or not depending on a class
2020-10-27 10:27:06 +03:00
Mikhail Glukhikh
d3e85dbce0
[FIR] Implement replacing Object with type parameters for specials builtins
...
#KT-42601 Fixed
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh
23e7468e57
[FIR2IR] Cache Java field-based properties more correctly #KT-42805 Fixed
...
Before this commit, we cached such IR properties by FIR property
which was created by Java field each time when we referenced it.
This led to signature clashes. Now we cache such IR properties
directly by associated FIR field.
2020-10-22 13:05:00 +03:00
Mikhail Glukhikh
3576cbf0d8
[FIR] Add test for KT-42805
2020-10-22 13:04:59 +03:00
Mikhail Glukhikh
f2c651ec9c
[FIR2IR] Don't generate Any delegated members for data class
...
#KT-42771 Fixed
2020-10-22 13:04:59 +03:00
Mikhail Glukhikh
44459e8ac7
FIR mangler: fix alias-based type handling #KT-42770 Fixed
2020-10-22 13:04:58 +03:00
Jinseong Jeon
46cc01602e
FIR2IR: add implicit NOT_NULL cast if needed
2020-10-22 10:51:20 +03:00
Dmitry Petrov
b1b87becc8
PSI2IR more JVM-like exhaustive when behavior KT-36840
2020-10-21 20:07:11 +03:00
pyos
95fb597da0
PSI2IR / FIR2IR: bind FunctionN as receiver when suspend-converting
...
This is more consistent with adapted references & allows skipping a
temporary variable.
2020-10-21 15:21:01 +02:00
pyos
ccf921510d
PSI2IR / FIR2IR: do not create temporaries for adapted references
...
Arguments to function references behave the same as arguments to
function calls and should be evaluated once regardless, so the temporary
is unnecessary.
2020-10-21 15:21:01 +02:00
Dmitry Petrov
0b34526321
JVM_IR remove lambda hack required for odd JVM+OI behavior in KT-35849
2020-10-21 13:47:01 +03:00
Dmitriy Novozhilov
bf1a00c73a
[FIR] Rework resolution of declaration statuses
...
There is introduced algorithm of resolution with jumps: before
resolution of some class we resolve all status of members of its
supertypes, so we can properly determine inherited visibility
and modifiers
2020-10-21 11:53:10 +03:00
Dmitry Petrov
3979cde738
Add box and PSI2IR tests for special cases listed in KT-35849
2020-10-20 19:31:40 +03:00
Dmitry Petrov
47c784f023
JVM_IR fix Java wildcard types translation
...
Types such as 'Collection<? extends CharSequence>' are treated as
'(kotlin.collections.MutableCollection<out kotlin.CharSequence!>
..kotlin.collections.Collection<kotlin.CharSequence!>?)'
by the front-end.
When generating generic signatures, JVM BE takes lower bound (which is
'kotlin.collections.MutableCollection<out kotlin.CharSequence!>').
Emulate this behavior in TypeTranslator.
2020-10-19 20:52:53 +03:00
Jinseong Jeon
5f64d6ec76
FIR2IR: add support for callable reference to Java field
...
#KT-42656 Fixed
2020-10-15 08:47:46 +03:00
Alexander Udalov
45a0850d95
Fix KotlinType.isNullabilityFlexible for types based on type parameters
...
In the compiler, this function was used in psi2ir (and it affected
nullability annotations in the resulting JVM class files), in "useless
elvis with null on the right side" diagnostic checker, and in light
classes.
#KT-42650 Fixed
2020-10-14 19:32:51 +02:00