Dmitriy Novozhilov
c558df5b4a
[CMI] Fix rendering metainfos at the end of file
2020-12-16 19:52:22 +03:00
Dmitriy Novozhilov
ceb44ddccd
[CMI] Improve CodeMetaInfoRenderer
...
1. Properly handle meta which start == end
2. Sort metainfos of one range by tag
2020-12-16 19:52:21 +03:00
Dmitriy Novozhilov
98a2f29f95
[CMI] Allow using right angle bracket symbol in MetaInfo message
2020-12-16 19:52:21 +03:00
Dmitriy Novozhilov
09df07349c
[CMI] Add ability to replace render configuration of DiagnosticCodeMetaInfo
2020-12-16 19:52:21 +03:00
Dmitriy Novozhilov
d6ff83c7d8
[CMI] Add ability to copy ParsedCodeMetaInfo
2020-12-16 19:52:21 +03:00
Dmitriy Novozhilov
3bf60b3acc
[CMI] Rename CodeMetaInfo.platforms to attributes
2020-12-16 19:52:21 +03:00
Dmitriy Novozhilov
ced9a6fe35
[CMI] Replace getTag with tag property in CodeMetaInfo
2020-12-16 19:52:21 +03:00
Dmitriy Novozhilov
9e31b049fc
[CMI] Add additional constructor for DiagnosticCodeMetaInfo
2020-12-16 19:52:21 +03:00
Dmitriy Novozhilov
87a6a66953
[CMI] Parse description of meta info and save it to ParsedCodeMetaInfo
2020-12-16 19:52:20 +03:00
Dmitriy Novozhilov
2bbab3170f
[CMI] Replace StringBuffer with StringBuilder in CodeMetaInfoRenderer
2020-12-16 19:52:20 +03:00
Dmitriy Novozhilov
25c011ca40
[CMI] Extract core of CodeMetaInfo to :compiler:tests-common
2020-12-16 19:52:20 +03:00
Dmitriy Novozhilov
23c088afd6
[TEST-GEN] Reorganize package structure in :generators:test-generator module
2020-12-16 19:52:20 +03:00
Dmitriy Novozhilov
380e8a3814
[TEST-GEN] Extract run of TestGenerator to top of test generation DSL
2020-12-16 19:52:19 +03:00
Mikhail Glukhikh
0e43eaa662
Don't call possibleGetterNamesByPropertyName without a reason
2020-12-16 19:50:13 +03:00
Dmitriy Novozhilov
44948aa9a2
[FE] Properly report diagnostics about type arguments of implicit invoke
...
#KT-40396 Fixed
2020-12-16 17:57:58 +03:00
Dmitriy Novozhilov
329066a4f3
[Parser] Fix parsing of unfinished dot access in string template
...
Problem appeared in cases like this: "{someVar.}"
#KT-34440 Fixed
2020-12-16 17:57:56 +03:00
Dmitry Petrov
8999fd88b1
JVM_IR KT-43401 KT-43518 fix ACC_STRICT and ACC_SYNCHRONIZED flags
2020-12-16 14:10:36 +03:00
Dmitry Petrov
7ed3860c70
JVM_IR KT-43043 fix nullability annotations for inline class members
2020-12-16 13:43:29 +03:00
Igor Yakovlev
2fa5ab6e31
[FIR IDE] LC Remove difficult caching from FirLightClassBase
2020-12-16 12:29:54 +03:00
Igor Yakovlev
f282b721bc
[FIR IDE] LC Fix test data
2020-12-16 12:29:53 +03:00
Igor Yakovlev
46071c1925
[FIR IDE] LC fix annotations with special sites and nullability
2020-12-16 12:29:53 +03:00
Victor Petukhov
d32d0a65f0
Revert "Report warning on @JvmStatic in private companion objects"
...
This reverts commit 9669ab14
2020-12-16 10:24:18 +03:00
Victor Petukhov
94deddef7f
Revert "Minor: cover negative cases with test +m"
...
This reverts commit 04a4f9cd
2020-12-16 10:24:12 +03:00
Ilya Kirillov
a0ed14eafe
FIR: use real source element for return statement
...
fix fir
2020-12-15 22:15:51 +01:00
Andrei Klunnyi
3af0257b38
KTIJ-664 [SealedClassInheritorsProvider]: IDE-specific implementation
2020-12-15 18:43:00 +01:00
Jinseong Jeon
efeabac2c5
FIR: do not force coercion-to-Unit for nullable lambda return type
...
3d7d87ac should have been implemented as aafe41c did.
2020-12-15 17:52:49 +03:00
Jinseong Jeon
6239301f4e
FIR: no constraint for coerced-to-Unit last expression of lambda
2020-12-15 17:52:49 +03:00
Jinseong Jeon
4ab0897d7d
FIR: pass the explicit expected type to block type
...
This helps avoid adding redundant return Unit into block.
2020-12-15 17:52:48 +03:00
Jinseong Jeon
0ea6b32c01
NI: allow lower bound of flexible type for coercion-to-Unit
...
Example from
box/inference/coercionToUnitForLambdaReturnTypeWithFlexibleConstraint
// FILE: TestJ.java
public class TestJ {
public static <T> In<T> materialize() { return null; }
}
// FILE: test.kt
class In<in T>
fun <T> inferred(e: In<T>?, l: () -> T): T = l()
fun box() {
inferred(TestJ.materialize<Unit>(), { null })
}
`materialize` has flexible type, both for `In<T>` and `T`.
When analyzing `{ null }`, collected type constraints include:
ft<Unit?, Unit> <: T (from ft<In<ft<Unit, Unit?>>, In<ft<Unit, Unit?>>?>)
By allowing the lower bound of flexible type, FIR resolution can visit
`{ null }` with the expected type Unit, which will lead to proper
coercion to Unit at the end.
2020-12-15 17:52:48 +03:00
Dmitry Petrov
b0f6461fa9
JVM_IR KT-42020 special IdSignature for some fake override members
2020-12-15 12:56:45 +03:00
Jinseong Jeon
12cfba9ca9
FIR BB: remove stale test ignoring tags in old language versions
...
Since bf06d381 (move old Java nullability assertion tests...),
these tests aren't used by (Fir|Ir)BlackBoxCodegenTest anymore.
2020-12-15 11:52:50 +03:00
Jinseong Jeon
f7ade2b0b8
FIR2IR: introduce implicit casts for extension receivers
2020-12-15 11:52:49 +03:00
Igor Yakovlev
010a290132
[LC] Fix for light classes equivalence
2020-12-15 01:51:23 +03:00
Igor Yakovlev
45112a3c11
[ULC] Fix invalid positive inheritor for self checking
...
Fixed #KT-43824
2020-12-14 20:34:42 +03:00
Shagen Ogandzhanian
32cc95a3b0
[JS IR] Skip export annotations while generating default stubs
2020-12-14 16:41:27 +01:00
Svyatoslav Kuzmich
d37271bf35
[Wasm] Support packed integer array elements
2020-12-14 14:40:38 +03:00
Svyatoslav Kuzmich
51e8d782b0
[Wasm] Support packed integer class fields
2020-12-14 14:40:38 +03:00
Dmitriy Novozhilov
55b0775565
[FE] Call SealedClassInheritorsProvider only for sealed classes
2020-12-14 10:43:14 +03:00
Andrey Uskov
9be7221efd
Clear IC caches if they were not properly closed
2020-12-13 20:17:27 +03:00
Andrey Uskov
275a02ce88
Fix synchronization when working with IC caches
...
IC caches could be modified and read from different threads.
In JPS builder these threads are RMI worker (invoked from Compiler
Daemon) and JPS worker thread. Proper synchronization fixes cases
when caches could become broken.
#KT-42265 Fixed
#KT-42194 Fixed
#KT-42265 Fixed
#KT-42937 Fixed
2020-12-13 20:17:22 +03:00
Andrey Uskov
2e607335db
Add tests for incremental compilation of sealed interfaces
2020-12-13 20:17:18 +03:00
Andrey Uskov
36f99156fd
IC of sealed classes
...
Supported case then children of sealed classes could be declared
anywhere in a module. If list of classes implementing sealing class
changes the sealed class and all its inheritors should be recompiled
(now sealed class should be compiled together with children in order
to calculate all possible inheritors at compile time) and and
invalidated (as they could have when operators).
2020-12-13 20:17:16 +03:00
Ilya Kirillov
2201dd5198
FIR: make FirSyntheticPropertiesScope to be name aware
2020-12-12 12:26:56 +01:00
Kristoffer Andersen
8a5f260d04
[IR] Align debugging of suspend lambdas with old BE
...
The existing backend restores LVs and parameters from the suspend lambda
fields used for spilling between suspension points, hence they are
visible in the debugger as local variables, plain and simple.
This PR introduces the same pattern to the IR backend, to bring the
debugging experience in line with the existing backend.
Both backends are still at the mercy of the liveness analysis
performed in the coroutine transformer where a liveness analysis
minimizes live ranges of entries in the LVT. E.g. an unused parameter
will be dropped entirely.
Adjusted existing test expectations accounting for the differences in
LV behavior.
2020-12-12 11:48:47 +01:00
Dmitry Petrov
b7330a9e14
JVM_IR KT-43877 fix generic signatures for SAM-converted lambdas
2020-12-11 20:26:29 +03:00
Ilmir Usmanov
dc11c2de77
IC Mangling: Use correct java field type if the type is inline class
...
in JVM_IR BE.
#KT-26445
2020-12-11 17:51:39 +01:00
Ilmir Usmanov
2b0a99b7b0
IC Mangling: Use correct java field type if the type is inline class
...
in old JVM BE.
#KT-26445
2020-12-11 17:51:37 +01:00
Ilmir Usmanov
69bb65496f
IC Mangling: Change test since we pass boxed inline class to java method
...
#KT-28214
2020-12-11 17:51:34 +01:00
Ilmir Usmanov
cbb8eb494a
IC Mangling: Do not mangle functions with inline classes from Java
...
in JVM_IR BE. Map types to boxed variants, when mapping signatures.
#KT-26445
2020-12-11 17:51:32 +01:00
Ilmir Usmanov
0cab69a7a0
IC Mangling: Do not mangle functions with inline classes from Java
...
in old JVM BE. Map types to boxed variants, when mapping signatures.
#KT-26445
2020-12-11 17:51:30 +01:00