pyos
5873511f64
Generalize AbstractForeignAnnotationsTestBase to FIR
2021-08-10 13:19:22 +03:00
pyos
e2e0358505
Remove "FIR" foreign annotation tests
...
They do not actually use FIR.
2021-08-10 13:19:21 +03:00
Tianyu Geng
1607a8231a
FIR checker: ABSTRACT_PROPERTY_IN_PRIMARY_CONSTRUCTOR_PARAMETERS
2021-08-10 13:02:10 +03:00
Tianyu Geng
927723c766
FIR checker: fix JAVA_TYPE_MISMATCH checker
...
First, the order of arguments is swapped.
Second, projection erasure for argType was too aggressive. We should
instead retain the projections that are under an invariant position.
2021-08-10 13:00:18 +03:00
Ilya Goncharov
766857881a
[JS IR] Review remarks
...
- Use intrinsic on this
- Enqueue invoke for DCE
- Change transform
- Ignore instead of target backend
^KT-46204 fixed
2021-08-10 07:24:51 +00:00
Ilya Goncharov
2f0f88062a
[JS IR] Change global map in context to mapping
...
^KT-46204 fixed
2021-08-10 07:24:50 +00:00
Ilya Goncharov
b6c3132614
[JS IR] Ignore test for legacy backend
...
^KT-46204 fixed
2021-08-10 07:24:49 +00:00
Ilya Goncharov
e6af3ff6a8
[JS IR] Rename and doc new intrinsics, add new intrinsic to call suspend fun as supertype
...
^KT-46204 fixed
2021-08-10 07:24:48 +00:00
Ilya Goncharov
a70fc99130
[JS IR] Add intrinsic to call suspend functions as super type
...
^KT-46204 fixed
2021-08-10 07:24:47 +00:00
Ilya Goncharov
22d202e657
[JS IR] Add test on type check of suspend functional interfaces
...
^KT-46204 fixed
2021-08-10 07:24:47 +00:00
Ilya Goncharov
755f847ab9
[JS IR] Use invoke for coroutines in runtime
...
^KT-46204 fixed
2021-08-10 07:24:46 +00:00
Ilya Goncharov
3c9dcdbbee
[JS IR] Generate suspend function as invoke
...
[JS IR] Fix type check utils to work with array of arities
[JS IR] Store multiple arities for suspend functional interface implementers
^KT-46204 fixed
2021-08-10 07:24:46 +00:00
Georgy Bronnikov
1d913a6bf0
JVM_IR: add test for serialization of raw types
2021-08-10 00:37:46 +03:00
Georgy Bronnikov
3b8cb4b00d
ModuleTransformerForTwoFilesBoxTests -> SplittingModuleTransformerForBoxTests
...
Need to include Java files in IR serialization tests, so generalize
TwoFilesBoxTest for more than two files.
2021-08-10 00:37:44 +03:00
Georgy Bronnikov
13cf9329b2
IR: always serialize constant initializers for fields.
2021-08-10 00:37:42 +03:00
Georgy Bronnikov
7e71bd8f1c
Add module dependency to fir/checkers/checkers-component-generator
...
This is a transitive dependency needed when bootstrapping in
-Xserialize-ir mode.
2021-08-10 00:37:41 +03:00
Georgy Bronnikov
307de0be89
IR: always update deserializedSymbols in referenceLocalIrSymbol
...
The symbol created in deserializeIrSymbolToDeclare might be discarded
when an existing declaration is used in deserialization (as it happens
when deserializing IR bodies for JVM declarations).
2021-08-10 00:37:37 +03:00
Georgy Bronnikov
eccbf38061
IR: use existing type parameters when deserializing IR
2021-08-10 00:37:36 +03:00
Georgy Bronnikov
fb801bdc33
IR: fix mangling of toplevel properties
2021-08-10 00:37:36 +03:00
Georgy Bronnikov
54957ead5c
JVM_IR: add test for signatures of flexible types
2021-08-10 00:37:27 +03:00
Georgy Bronnikov
1d2d1f9e8d
IR: change mangling for flexible types in DescriptorMangleComputer
...
This reverts commit 4af2aaedb1 .
2021-08-10 00:37:24 +03:00
Alexander Udalov
afacff326d
JVM IR: fix smart cast on argument of 'throw'
...
#KT-48163 Fixed
2021-08-09 22:34:44 +02:00
Ilya Kirillov
cb37a05b79
Restore LC compiler testdata
2021-08-09 20:29:22 +02:00
Jinseong Jeon
4396482fed
FIR IDE: fix nullability of KtType variants
2021-08-09 20:29:19 +02:00
Ivan Kochurkin
c1afb6354b
[FIR] Restore UPPER_BOUND_VIOLATED and TYPE_VARIANCE_CONFLICT as errors, fix TestStep.kt
2021-08-09 18:19:58 +03:00
Andrey Zinovyev
1b81018b69
[FIR] Fix overloading of renamed jvm methods
...
#KT-48102 Fixed
2021-08-09 15:22:06 +03:00
Tianyu Geng
cd99c35649
FIR: instantiate type argument to captured type if needed
2021-08-09 14:38:30 +03:00
Tianyu Geng
bcf6582af7
FIR checker: make TypeApproximatorConfiguration.capturedType consistent with others
2021-08-09 14:38:30 +03:00
Tianyu Geng
758859f198
FIR checker: report JAVA_TYPE_MISMATCH
2021-08-09 14:38:29 +03:00
Alexander Dudinsky
3d81eba32b
New HMPP import and highlighting tests
...
New tests `testHmppLibAndConsumer` and `testMultiModulesHmpp` were added
The first is a test with MPP library and its consumers, it checks import
and also highlighting before and after the library was published
The second is a project which contains three multiplatform modules and
two platform modules and checks import and highlighting.
Original commit: https://jetbrains.team/p/ij/repositories/intellij/revision/15582b03530eba4fa0e3d0b512bb0a4c1fa3aa4c
2021-08-07 00:07:27 +03:00
Alexander Udalov
bc5a79ffcc
Minor, add test on repeatable annotations on property getters
...
#KT-14392
#KT-36476
2021-08-06 22:47:44 +02:00
Alexander Udalov
209c0fe819
Revert "[Test] Temporary mute some tests because of problems with RepeatedAnnotationLowering"
...
This reverts commit 3a210f6c81 .
2021-08-06 22:47:44 +02:00
Alexander Udalov
f8af127a4e
Do not load Java @Repeatable for Kotlin-repeatable annotations
...
#KT-48131 Fixed
2021-08-06 22:47:36 +02:00
Alexander Udalov
89b3013294
Build: enable Werror for all compileJava tasks
2021-08-06 22:37:00 +02:00
Alexander Udalov
11902c7f8f
Fix warnings in daemon-related modules
2021-08-06 22:36:59 +02:00
Alexander Udalov
376b420d1a
Fix warnings in JS/WASM modules
2021-08-06 22:36:22 +02:00
Alexander Udalov
e0643a4185
Build: use -Xskip-runtime-version-check globally in project
2021-08-06 22:36:22 +02:00
Dmitriy Novozhilov
b9dd73220c
[FIR] Update testdata after rebase
2021-08-06 22:57:19 +03:00
Dmitriy Novozhilov
1d491fdce6
[FIR] Don't create union call node for lambda from one when branch and call from condition of another
2021-08-06 22:57:18 +03:00
Tianyu Geng
684ef871ee
FIR: unify common special names scattered around the code base
2021-08-06 22:57:17 +03:00
Tianyu Geng
263b876e6e
FIR: extends scope of SENSELESS_COMPARISON
...
FE1.0 only reports SENSELESS_COMPARISON if one of the operand is `null`.
This change makes FIR reports also in case one of the operand has type
`Nothing?`.
In addition, fix handling of type alias in ConeTypeContext#isNullableType
2021-08-06 22:57:17 +03:00
Tianyu Geng
c7272f6986
FIR checker: SENSELESS_(COMPARISON|NULL_IN_WHEN)
...
Currently DFA does not set "definitely equal to null" for access to variables that got assigned `null`. For example, FIR should mark the following line as SENSELESS_COMPARISON due to `s = null` above.
https://github.com/JetBrains/kotlin/blob/d1531f9cdd5852352c0133198706125dc63b6007/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.fir.kt#L6
The problem is at https://github.com/JetBrains/kotlin/blob/7e9f27436a77de1c76e3705da7aa1fbe8938336b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt#L1104
For null assignment, ideally the type should be `Nothing?`. This is
addressed in a followup commit instead.
2021-08-06 22:57:16 +03:00
Tianyu Geng
4726dcce40
FIR DFA: smartcast variable to Nothing? on null assignment
...
In order to make resolution still work for members not available from
`Nothing`, we track the type without `Nothing?` and use that for
resolution instead.
2021-08-06 22:57:15 +03:00
Tianyu Geng
7e2f15f532
FIR DFA: fix logic clear aliasing
...
The logic should clear back aliases as well. To ensure all back aliases
don't lose any information, statements on the original variable are
copied over to its aliases.
2021-08-06 22:57:15 +03:00
Tianyu Geng
e495c722c7
FIR DFA: fix handling of equality operation
2021-08-06 22:57:14 +03:00
Tianyu Geng
0026560bd7
FIR: substitute the whole lambda body after builder inference
2021-08-06 22:57:13 +03:00
Tianyu Geng
f737d8002e
FIR: allow no else branch for when on Nothing(?)
2021-08-06 22:57:12 +03:00
Tianyu Geng
e242ad955b
FIR: tolerate comparison of an intersection of incompatible types
...
Previously, if user compares an `it<String, Int>` with `String`, the
checker reports it since the flattened types `[String, Int, Int]` are
incompatible. But technically, before flattening, the intersection type
actually contain the other side, so they should really be compatible.
2021-08-06 22:57:11 +03:00
Roman Artemev
2574c00dd9
Add index() to LocalSignature for more clear access
2021-08-06 20:49:20 +03:00
Roman Artemev
5a7298808e
[JVM KLIB] Fix Type Parameter resolve
2021-08-06 20:49:19 +03:00