Commit Graph

87184 Commits

Author SHA1 Message Date
sebastian.sellmair c07dcb27df [Gradle] CommonizerIT: Add assertion on commonMain when jvm target is present 2021-08-09 09:48:42 +00:00
sebastian.sellmair 5485a6d6cd [Gradle] CInteropCommonizerDependent: Drop bad condition on compilations
The dropped condition is bad, since source sets like 'commonMain'
might still participate in a 'compileKotlinMetadata' task,
which is not a shared native compilation.

It is absolutely okay to just rely on the return of
'getCommonizerTarget': If a shared commonizer target is returned,
then the source set is guaranteed to be a shared native source set.

^KT-48118 Verification Pending
2021-08-09 09:48:42 +00:00
sebastian.sellmair b1c5c10233 [Gradle] Implement test KT-48118 c-interops available in commonMain
Integration Test project was taken from:
https://github.com/4qa/kotlin-multiplatform-issues/tree/cinterop-common

The issue seems to be twofold:
1) The old `compileKotlinMetadata` task is still found, even
when compatibilityMetadataVariant is disabled

2) The shared native compilation for commonMain can't be found, because
it is not listing its default source set:
(see: https://youtrack.jetbrains.com/issue/KT-45412)

Covers ^KT-48118
2021-08-09 09:48:42 +00:00
Mikhail Glukhikh 37d25a58e8 Fix .gitignore (intellij directory) 2021-08-09 10:00:24 +03:00
Ilya Matveev 6c7f04ffc6 [K/N][tests] Fix disabling stress_gc_allocations for No-op GC 2021-08-07 06:28:50 +00:00
Nikita Bobko a97b4ea4ae Fix UnsupportedClassVersionError when running ./gradlew generateIdePluginGradleFiles
This commit fixes:
```
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/intellij/jps/impl/JpsIdePluginManagerImpl has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
```
2021-08-07 00:07:30 +03:00
Nikita Bobko dac4fe7507 Adapt coop-dev for 212 platform 2021-08-07 00:07:28 +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 c821aba3bd Fix warnings in native modules 2021-08-06 22:37:00 +02:00
Alexander Udalov 45ffe58b9c Fix warnings in idea-frontend-fir 2021-08-06 22:37:00 +02:00
Alexander Udalov 069e040af9 Fix warnings in kotlin-klib-commonizer 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 ca7334acb9 Fix some warnings in Gradle plugin and related modules 2021-08-06 22:36:58 +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
Alexander Udalov 1599a049aa Fix warnings in scripting modules 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
Yahor Berdnikau b5ea811b9f Migrated BuildCacheIT tests to new DSL.
^KT-45745 In Progress
2021-08-06 20:09:05 +02:00
Yahor Berdnikau 20afb268d1 Allow providing specific kapt options.
^KT-45745 In Progress
2021-08-06 20:09:04 +02:00
Yahor Berdnikau 3d4186bdb1 Allow enabling build cache debug information.
^KT-45745 In Progress
2021-08-06 20:09:04 +02:00
Yahor Berdnikau e949a0d38d Add assertion checking if task was put into build cache.
^KT-45745 In Progress
2021-08-06 20:09:00 +02: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
Roman Artemev 3dcee8fda8 [KLIB] Optimize deserialization a bit 2021-08-06 20:49:19 +03:00
Roman Artemev 7add820f0d [JS IC] Simplify code a bit 2021-08-06 20:49:17 +03:00
Roman Artemev 398b545801 [JS IC] Rollback hack 2021-08-06 20:49:17 +03:00
Roman Artemev 67f814c99f [JS IC] Don't serialize IrTypeAbbreviation in IC cache 2021-08-06 20:49:15 +03:00
Roman Artemev d174e8c3d2 small optimization 2021-08-06 20:49:14 +03:00
Roman Artemev 9bfe502afd [JS IC] Fix signature finding in some cases
Found in KFSAD
2021-08-06 20:49:13 +03:00
Roman Artemev 15648da2b4 [PIR] Use simple fast hashCode 2021-08-06 20:49:12 +03:00
Roman Artemev 11f70412e7 [KLIB] Don't resolve delegated symbol where it could be existed 2021-08-06 20:49:12 +03:00
Roman Artemev 297e0a9f43 [JS IC] Improve IC deserializer code a bit 2021-08-06 20:49:11 +03:00
Roman Artemev 6ca87dc43f [KLIB] Drop useless set 2021-08-06 20:49:10 +03:00
Roman Artemev aeea7147fe [JS IC] Simplify code a bit more 2021-08-06 20:49:09 +03:00
Roman Artemev 28cf9898ef [KLIB] Simplify file symbol resolve 2021-08-06 20:49:08 +03:00
Roman Artemev 6cd0d81561 [JS IC] Drop redundant enqueue 2021-08-06 20:49:07 +03:00