Dmitriy Novozhilov
cdf7de5524
[FE] Change message for sealed interfaces with language target < 1.5
2021-02-17 13:51:14 +03:00
Georgy Bronnikov
103f82c95c
IR: an option to automatically select the number of lowering threads
2021-02-17 11:03:27 +03:00
Georgy Bronnikov
52b3cb362b
IR: thread pool in PerformByIrFilePhase
2021-02-17 11:03:27 +03:00
Georgy Bronnikov
bea5d955d4
JVM_IR: perform file lowerings in parallel
...
Selected by -Xir-run-lowerings-in-paralled compiler flag.
2021-02-17 11:03:26 +03:00
pyos
1310a65f0c
JVM: rename this$0 when regenerating nested objects too
...
In the old backend, this was unnecessary because nested objects would
reference their lambdas' captures through the original this$0. On
JVM_IR, using loose capture fields means a name/descriptor clash can
occur on any level of nesting, not just the top.
2021-02-17 07:56:03 +01:00
Ilmir Usmanov
ec569a4c89
Minor. Suppress errors in tests
2021-02-16 20:59:25 +01:00
Ilmir Usmanov
bad197e075
Raise RESERVED_VAR_PROPERTY_OF_VALUE_CLASS to error
2021-02-16 20:59:21 +01:00
Dmitry Petrov
56a104dda9
JVM_IR KT-44974 fix SAM-converted capturing extension lambda
2021-02-16 19:51:59 +03:00
Dmitriy Novozhilov
dfcff132fd
[FIR] Fix false-positive smartcast on receiver in rhs of elvis
...
#KT-44942 Fixed
2021-02-16 17:51:32 +03:00
Dmitriy Novozhilov
2b39282682
[FIR] Render original type before smartcasted type in DEBUG_INFO_EXPRESSION_TYPE
...
This is made for keep consistency with same renderer in FE 1.0
2021-02-16 17:51:32 +03:00
Dmitriy Novozhilov
d4c26cca52
[FIR] Use type without smartcast for local variable with smartcasted initializer
2021-02-16 17:51:32 +03:00
Dmitriy Novozhilov
40e286b354
[FIR] Increase level of sequential when branches
...
Level of CFGNode is used to determine which call is a common one for
creating node with union of arguments (to merge flow from multiple
in-place lambdas). Before this change calls in different when branches
may have same node level, which entail passing smartcasts from moddle of
one branch to another
```
val x: Any = ...
when {
... -> run { x as String } // (1)
... -> {
run {
x.foo()
} // (2)
"hello"
}
}
```
Call `(1)` was assumed as argument of call `(2)` which is incorrect
#KT-44814 Fixed
2021-02-16 17:51:31 +03:00
Mads Ager
05ff2b1292
[JVM_IR] Extend when to switch translation to deal with nested ors.
...
FIR translates:
```
when (x) {
1, 2, 3 -> action
else -> other_action
}
```
to an IR structure with nested ors:
```
if ((x == 1 || x == 2) || (x == 3)) action
else other_action
```
This change allows that to turn into switch instructions in the
JVM backend.
2021-02-16 03:20:07 -08:00
pyos
2dc0404751
FIR: prioritize visible imported classes during type resolution
...
and produce an error on ambiguity.
2021-02-16 12:38:45 +03:00
Mark Punzalan
2f450549ab
FIR IDE: Update FIR diagnostic test data for
...
INAPPLICABLE_LATEINIT_MODIFIER.
2021-02-15 19:37:14 +01:00
Dmitry Petrov
b1ab64e854
JVM_IR KT-44483 argument adaptation is already done in PSI2IR
2021-02-15 19:41:39 +03:00
Alexander Udalov
899f75466d
Remove tests on kotlin-annotations-android
...
#KT-44815
2021-02-15 17:23:44 +01:00
Jinseong Jeon
a884555171
FIR: bail out early for override check if base candidate is private
2021-02-15 19:16:36 +03:00
Jinseong Jeon
09640d9d63
FIR checker: apply override checker to anonymous objects
...
^KT-44695 Fixed
2021-02-15 19:16:35 +03:00
Jinseong Jeon
9370f918e9
FIR: use override checker when populating directOverriddenProperties
2021-02-15 19:16:35 +03:00
Victor Petukhov
fa1507fb91
Fix FIR test lambdaParameterTypeInElvis
2021-02-15 18:51:51 +03:00
Dmitry Petrov
b262d09a81
JVM_IR KT-44627 fix bridge signature for parameter with primitive bound
2021-02-15 17:19:33 +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
Victor Petukhov
dcad9c84fc
Don't fix type variables into Nothing in priority way
...
^KT-44546 Fixed
2021-02-15 15:12:45 +03:00
Mikhael Bogdanov
f493766563
Add IR tests to Android codegen test
2021-02-15 11:24:10 +01:00
Victor Petukhov
c0759f96e9
Fix FIR test lambdaParameterTypeInElvis
2021-02-15 12:59:07 +03:00
Victor Petukhov
0d40022d6d
Add reporting of the warnings based on Java annotations for expanded type aliases
...
Before that, such warnings weren't reported as the corresponding errors were reported during type inference (only original types took part there)
2021-02-15 12:13:55 +03:00
Victor Petukhov
d783d99443
Use upper bound checker for typealias expansion
2021-02-15 12:13:53 +03:00
Victor Petukhov
edb8007d52
Add test for errors reporting of UPPER_BOUND_VIOLATED
2021-02-15 12:13:52 +03:00
Victor Petukhov
befe8599c4
Report warnings or errors for violated type parameter's upper bounds from Java annotated with nullability annotations
...
^KT-43262 Fixed
2021-02-15 12:13:50 +03:00
Dmitriy Novozhilov
5711a8d610
[FIR] Support PreliminaryLoopVisitor in FIR DFA
2021-02-15 11:37:39 +03:00
Victor Petukhov
6f64fd2fec
Propagate inference session into declaration analyzers
...
It prevents missing inference session for local declaration (local functions, local classes or objects)
^KT-44801 Fixed
2021-02-15 11:12:58 +03:00
Dmitry Petrov
6ba57abb8f
JVM don't use indy by default for SAM conversions (wait for KT-44844)
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:32 +03:00
Dmitry Petrov
5013344bc4
JVM_IR nullability assertions test for indy lambdas
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:32 +03:00
Dmitry Petrov
afeb7e18cd
JVM_IR indy: fix non-null assertions on indy lambda parameters
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:31 +03:00
Dmitry Petrov
3438d19c22
JVM_IR indy: use 'CLASS' mode in SAM bytecode listing tests
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:31 +03:00
Dmitry Petrov
7564c9bb8c
JVM SamWrapperClassesAreSynthetic language feature
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:31 +03:00
Dmitry Petrov
052f6929c9
JVM_IR indy SAM conversions: update tests
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:30 +03:00
Dmitry Petrov
3ebeca5852
JVM_IR: use indy SAM conversions in jvmTarget 1.8+, fix bridges
...
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:30 +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
7c61ddc72b
[FE] Allow declaring protected constructors in sealed classes
...
#KT-44865 Fixed
2021-02-12 13:36:39 +03:00
Dmitriy Novozhilov
f3a8fcaea6
[FE] Make constructors of sealed classes protected instead of internal
2021-02-12 13:36:38 +03:00
Jinseong Jeon
20f9787c70
FIR checker: report errors in contract description
2021-02-11 17:02:18 +03:00
Alexander Udalov
510b9e6f2a
Move around some codegen box tests
...
In tests merged from boxAgainstJava in 29b96aa1 , some directories were
named slightly differently compared to box, e.g. "property" vs
"properties", "varargs" vs "vararg". This change renames these, moves
some of the tests to more fitting directories, and also renames
"visibility" to "javaVisibility" because it's about Java visibilities
specifically.
2021-02-11 13:50:09 +01:00
Alexander Udalov
2d60fa787d
Remove codegen tests on old language and API versions
2021-02-11 13:50:09 +01:00
Alexander Udalov
401f0ac583
Use TARGET_BACKEND instead of DONT_TARGET_EXACT_BACKEND in box against Java tests
...
"// TARGET_BACKEND: JVM" more clearly says that the test is
JVM-specific, rather than DONT_TARGET_EXACT_BACKEND which excludes all
other backends.
2021-02-11 13:50:08 +01:00
Victor Petukhov
f797ee7803
Substitute captured types with inner intersection one (NewTypeSubstitutor)
...
^KT-44651 Fixed
2021-02-11 14:20:14 +03:00
Mikhail Glukhikh
57e06992c9
Skip JDK 6 in failing BB test (java.util.function in use)
2021-02-11 12:59:23 +03:00
Mikhail Glukhikh
cd483ad231
FIR2IR: fix raw SAM conversion (avoid * in type arguments)
2021-02-11 11:48:35 +03:00