Alexander Udalov
2f86554d5a
IR: don't produce fake overrides for static and private declarations
...
Note that only irrelevantStaticProperty.kt failed before this change.
Having private declarations caused no problems, but it seems incorrect,
so it's fixed now and irrelevantPrivateDeclarations is added just in
case.
#KT-41848 Fixed
2020-09-12 20:01:34 +02:00
Alexander Gorshenev
744f290fc4
A proper modality calculation was missing in IR fake override construction algorithm
...
#KT-41765 Fixed
2020-09-11 18:56:17 +03:00
Louis CAD
2886f48795
Improve spelling in Kotlin Test module's README.md
2020-09-11 18:45:58 +03:00
Ilmir Usmanov
52f9569d33
Generate CHECKCAST Object inside the markers
...
otherwise, the unboxing interferes with bytecode analysis.
2020-09-09 17:43:42 +02:00
Ilmir Usmanov
e8a451072e
Minor. Add tests with same JvmType in covariant override
2020-09-09 17:43:41 +02:00
Ilmir Usmanov
7cbd067460
Add tests with resume path
2020-09-09 17:43:39 +02:00
Ilmir Usmanov
1c97eafea8
Check for COROUTINE_SUSPENDED inside callable reference
...
#KT-41429 Fixed
2020-09-09 17:43:37 +02:00
Alexander Udalov
3d7619421f
JVM IR: fix exception on star projection in type parameter upper bound
...
#KT-41761 Fixed
2020-09-09 17:07:52 +02:00
Victor Petukhov
c1ebd33833
Capture flexible intersection types properly: take into account both bounds and use the same captured arguments for them
...
^KT-41693 Fixed
2020-09-09 14:52:12 +03:00
Alexander Udalov
3a5d0ab427
JVM IR: fix HashCode intrinsic for generics substituted with primitives
...
The problem here was that although the IR type of the expression was
primitive, the type of the actual expression in the bytecode generated
after type erasure was `Ljava/lang/Object;`, and we were trying to call
a non-existing method `Object.hashCode(Object)`.
#KT-41669 Fixed
2020-09-08 23:37:00 +02:00
Dmitry Petrov
b00ce872ea
JVM: record JVM signature for equals/hashCode/toString in inline classes
2020-09-07 12:25:50 +03:00
Dmitriy Novozhilov
696f089b3e
Make DescriptorVisibility delegate to Visibility
2020-09-04 11:42:50 +03:00
Dmitriy Novozhilov
d1fd1da56f
Rename Visibility to DescriptorVisibility
2020-09-04 11:07:42 +03:00
Dmitriy Novozhilov
2bcd8ee07f
Get rid of Visibility.effectiveVisibility member
2020-09-04 11:07:42 +03:00
Dmitriy Novozhilov
bf4bf30b4a
Move CompanionObjectMapping to :core:compiler.common
2020-09-04 11:07:40 +03:00
Victor Petukhov
85d99612a2
Don't create inconsistent types (with contradictive use site and declaration site variances) for star projections with corresponding contravariant type parameters during substitution
...
^KT-41388 Fixed
2020-09-03 16:24:28 +03:00
pyos
6b65a2ea7d
JVM_IR: move classes out of lambdas inlined into initializers
...
Fixes KT-41465
2020-09-02 20:03:38 +02:00
Florian Kistner
9775a2148a
203: Fix compilation
2020-09-02 18:48:57 +02:00
Roman Artemev
2612609664
[JS] Add test for KT-39378
2020-09-02 14:42:17 +03:00
Roman Artemev
0bff406a12
[JS IR] Add infra to test compilation with error
...
- add bunch of tests
- fix help test
2020-09-01 14:53:08 +03:00
Roman Artemev
a60782f3df
[JS IR] Add CLI argument to setup error tolerance policy
...
- Make sure dev mode is enabled if code with errors is allowed
2020-09-01 14:53:07 +03:00
Steven Schäfer
b02f0f0a25
JVM IR: Fix compilation of nested inner classes
2020-08-28 20:03:19 +02:00
Mikhail Zarechenskiy
23f87d413a
Use initial system for completion if common one is effectively empty
...
Otherwise we can get unsubstituted type variables as expected types and
then write wrong information for assertions
#KT-41470 Fixed
2020-08-28 17:47:08 +03:00
Zalim Bashorov
9097d0918c
[JS BE] Support passing an array as argument of vararg in named form
...
#KT-38059 fixed
2020-08-28 13:14:23 +03:00
Zalim Bashorov
606232a584
[JS IR] Don't generate "import" statements for external interfaces
...
#KT-40964 fixed
2020-08-28 13:14:22 +03:00
Zalim Bashorov
ba846830c9
[JS IR] Support nativeGetter, nativeSetter and nativeInvoke
...
#KT-41081 fixed
2020-08-28 13:04:18 +03:00
Alexander Udalov
74c6d2b951
Do not generate non-standard compareTo as primitive comparison in all backends
...
Previous changes related to this in the old JVM backend were in
582b1c5e66 and
0482f7e9c5 , but they did not affect the
`ProperIeee754Comparisons` mode which became the default in 1.4.0. As a
result, we had a regression here.
Since the `PRIMITIVE_NUMERIC_COMPARISON_INFO` slice is used in psi2ir to
determine how to generate the comparison, this fixes the regression both
in the old JVM backend, and in all IR backends.
#KT-41426 Fixed
2020-08-27 19:00:11 +02:00
Dmitry Savvinov
5649cbc2e1
Wire KotlinTypeRefiner in areCallableDescriptorsEquivalent
...
See the issue for details
^KT-41218 Fixed
2020-08-27 18:50:42 +03:00
Dmitriy Novozhilov
9cde42e2bc
[NI] Fix shouldRunCompletion for builder inference session
...
#KT-41308 Fixed
#KT-41363
2020-08-27 16:51:12 +03:00
Dmitriy Novozhilov
e98cbf81cf
[NI] Don't always complete builder inference lambda in FULL mode
...
#KT-41164 Fixed
2020-08-27 16:51:11 +03:00
Mikhail Zarechenskiy
cba13c3c35
Take into account captured types with variables during fixation
...
#KT-41202 Fixed
2020-08-27 11:06:14 +03:00
Mikhail Zarechenskiy
06a592c018
Fix SOE when recursive type argument is used with star projection
...
#KT-41043 Fixed
2020-08-26 19:23:21 +03:00
Mikhail Zarechenskiy
567e6ca9ca
Fix OOM when there are several lambdas with extension function types
...
#KT-41335 Fixed
2020-08-26 19:23:18 +03:00
Dmitriy Novozhilov
a764732020
Rename KotlinBuiltInsNames to StandardNames
2020-08-25 10:41:33 +03:00
Dmitriy Novozhilov
45cf221b97
Move util functions from KotlinBuiltIns to :core:descriptors.common module
2020-08-25 10:31:36 +03:00
Dmitriy Novozhilov
20a2ad8223
Move FunctionClassDescriptor.Kind to :core:descriptors.common module
2020-08-25 10:31:36 +03:00
Dmitriy Novozhilov
7a7fe77b8e
Move static constants with builtin names to :core:descriptors.common module
2020-08-25 10:31:36 +03:00
Dmitriy Novozhilov
9d9f9c52c0
Extract some classes from descriptors module to :core:common
...
This is needed to remove dependencies from fir modules to
`:core:descriptors` module
What was extracted:
- Modality
- ClassKind
- org.jetbrains.kotlin.name package
2020-08-25 10:31:35 +03:00
Dmitry Petrov
a2dabe11c5
JVM KT-41150: Fix backward compatibility for inline vals in inline class
...
In 1.3.x, for inline class member inline vals 'getFoo-impl' method was
generated in corresponding inline class.
Since 1.4.0, getters for properties returning inline class values are
mangled (so corresponding getters are named 'getFoo-<mangling_hash>'.
However, to maintain backward compatibility with libraries compiled with
1.3.x, inliner should be able to find 'getFoo-impl' method in the
bytecode.
2020-08-24 16:17:12 +03:00
Steven Schäfer
ea98062241
JVM IR: Fix compilation of inline functions in anonymous objects...
...
...in class members. The corresponding classes end up nested in the
class initializer of the surrounding class and we need to take this into
account when creating instances of ClassCodegen.
This fixes KT-40332 on the JVM IR backend.
2020-08-24 14:10:36 +02:00
Mark Punzalan
1c1b1b4b0f
Initial version of RangeContainsLowering, which optimizes calls to
...
contains() on ClosedRanges.
2020-08-21 21:15:27 +02:00
Roman Artemev
fcca2c6fa3
[JS IR] fix failing test
2020-08-21 17:44:07 +03:00
Roman Artemev
e7f22bcfbc
[JS IR] Add test for cross module export
2020-08-20 22:16:20 +03:00
Mikhail Zarechenskiy
ced151f3af
Add test for KT-41254
...
It was fixed along with #KT-41005
2020-08-20 15:45:32 +03:00
Mikhail Zarechenskiy
6ed13ef1b6
Fix unresolved reference to catch parameter from lambda expression
...
#KT-41140 Fixed
2020-08-19 12:52:16 +03:00
Mikhail Zarechenskiy
f2fba8a469
Fix delegated property resolve when provideDelegate has this as argument
...
#KT-41135 Fixed
2020-08-19 12:52:16 +03:00
Igor Chevdar
e468a347b5
[box-tests] Tests on field init optimization
...
Added tests on all primitive types and a test when the field's type is an inline class
2020-08-15 12:16:33 +05:00
Steven Schäfer
9026f89ba5
JVM IR: Avoid CHECKCASTs on type operators (KT-39520)
...
The type information coming from Java or Kotlin generics may be wrong
due to type erasure and a CHECKCAST instruction could throw an
exception.
2020-08-14 21:58:47 +02:00
Alexander Udalov
469b164555
IR: minor optimizations to IR validation
2020-08-14 21:55:37 +02:00
Mikhail Zarechenskiy
aafe41cf7a
Do not force coercion to Unit for nullable lambda return type
...
#KT-41005 Fixed
2020-08-13 10:40:51 +03:00