Dmitry Petrov
e17158d961
JVM_IR KT-42758 don't use 'this' for object self-reference by name
2020-11-19 16:34:04 +03:00
Dmitry Petrov
118a7d4e34
JVM_IR KT-43242 generate switch subject as primitive 'int'
2020-11-19 16:34:04 +03:00
Andrei Klunnyi
05ddbeab0a
KT-42561 [Gradle Runner]: run task is created for extra modules
...
Approach to take classpath from 'project.sourceSets' failed because it
was applied to extra modules - those without java like plugins
(extending project model with 'sourceSets').
This commit specifies criterion of gradle-project selection - the one to
create run task for.
^KT-42561 fixed
2020-11-19 12:47:39 +00:00
LepilkinaElena
b0c74c841e
Remove extra copyOf calls during filtering in collectRealOverrides ( #3916 )
2020-11-19 09:53:25 +03:00
Alexander Udalov
7b5544ebd3
Use -source/target 1.6 for Java sources in codegen tests
...
In cases when the test has the JVM_TARGET directive, use that one for
Java compilation as well.
Otherwise, for box tests, the corresponding test in `JvmTarget6OnJvm6`
(module `:compiler:tests-different-jdk`) will fail. However, it affects
all codegen tests, so fix a bunch of them which use Java 8+ features to
explicitly compile with JVM target 1.8. In particular, this obsoletes
the SKIP_JDK6 directive in those tests because "JVM_TARGET: 1.8" also
skips it for JDK 6.
The check for IS_SOURCE_6_STILL_SUPPORTED is needed in order to still be
able to run tests in the project while only having a single JDK > 11
installed, and having all of the env vars JDK_16, JDK_17, JDK_18
pointing to that JDK.
2020-11-18 18:43:43 +01:00
Mads Ager
7b4e0b2f5d
[JVM_IR] Deal with lowering ordering issues for JvmStatic function references.
...
Do not destructively update the @JvmStatic function, instead
create a copy on first access, and replace the original with
the copy in the jvm static lowering. This ensures that the original
function is seen in other lowerings independently of file lowering
order.
2020-11-18 17:13:00 +01:00
Dmitry Petrov
3d2f5f4bc1
KT-42018 explicitly cast inline class values in safe-as
2020-11-18 18:51:15 +03:00
Kristoffer Andersen
edd3b457d4
[JVM+IR] Migrate/improve receiver mangling test suite
2020-11-18 15:18:10 +01:00
Kristoffer Andersen
5967e8295e
[IR] Align captured receiver variable naming with old BE
2020-11-18 15:18:10 +01:00
Vladimir Dolzhenko
7732fc38e0
Add more IDE performance tests vega chart specs
2020-11-18 14:31:56 +01:00
Mikhail Glukhikh
bcf6980f67
[FIR2IR] Fix CCE in FirTypeRef.canBeNull
2020-11-18 16:26:13 +03:00
Mikhail Glukhikh
91738b7f88
[FIR] Fix broken IDE test data
2020-11-18 16:05:50 +03:00
Dmitry Petrov
ca41f733b6
KT-41841 no delegate to private $default fun in multifile facade
2020-11-18 15:04:39 +03:00
Jinseong Jeon
9a99af53ba
FIR JVM: correct signature conversion for array
...
#KT-43339 Fixed
2020-11-18 13:06:51 +03:00
Jinseong Jeon
77ce5ea15d
FIR Java: handle primitive void return type for synthetic setter
2020-11-18 13:06:50 +03:00
Jinseong Jeon
5c61079d75
FIR: reproduce KT-43339 (Throwable.stackTrace)
2020-11-18 13:06:49 +03:00
Jinseong Jeon
4cb32cd38a
FIR2IR: add implicit NOT_NULL cast for @FlexibleNullability type
2020-11-18 13:06:48 +03:00
Mikhail Glukhikh
b658e99f91
FIR Java: simplify flexible nullability manipulations
2020-11-18 13:06:47 +03:00
Jinseong Jeon
fc7f589caa
FIR Java: record Java types with flexible nullability
2020-11-18 13:06:46 +03:00
Jinseong Jeon
1f48092ec1
FIR Java: convert more annotations to @EnhancedNullability
2020-11-18 13:06:45 +03:00
Alexander Gorshenev
01ef41ab17
No need to explicitly deprecate -Xdisable-fake-override-validator
...
A warning is produced automagically
2020-11-18 12:46:40 +03:00
Alexander Gorshenev
f42b902bc8
Made -Xfake-override-validator off by default
...
Deprected -Xdisable-fake-override-validator
2020-11-18 12:46:40 +03:00
Steven Schäfer
4e03b1e05f
JVM: Allow the JvmSynthetic annotation on file classes (KT-41884)
2020-11-17 22:06:19 +01:00
Dmitriy Dolovov
66bc142f92
[Commonizer] Empty sources/javadocs Jars
2020-11-17 19:02:18 +03:00
Dmitry Petrov
a27c6b77cf
KT-43370 ACC_DEPRECATED on property accessors implemented by delegation
2020-11-17 18:16:37 +03:00
Dmitriy Novozhilov
986bdd1099
Build: replace usages of kotlin.build.useIR with kotlinBuildProperties.useIR
2020-11-17 18:14:09 +03:00
Dmitriy Novozhilov
c625a83ab5
Build: replace usages of idea.fir.plugin with kotlinBuildProperties.useFirIdeaPlugin
2020-11-17 18:14:08 +03:00
Dmitriy Novozhilov
1a3727a17c
Build: advance kotlin-build-gradle-plugin version in build files
2020-11-17 18:14:08 +03:00
Dmitriy Novozhilov
f531612aa4
Build: update kotlin-build-gradle-plugin version
2020-11-17 18:14:08 +03:00
Dmitriy Novozhilov
bab08c29be
Build: add several FIR flags to kotlin-build-gradle-plugin
2020-11-17 18:14:08 +03:00
Alexander Udalov
8160f579d3
Build: add useIR/useIRForLibraries to kotlin-build-gradle-plugin
2020-11-17 18:14:07 +03:00
Nikolay Krasko
e331e80b5d
Build: Temporary disable capturing inputs for tasks
...
We are suffering from the increasing build scan queue. Try to help
the server to overcome it.
2020-11-17 15:08:44 +03:00
Ivan Gavrilovic
33a0ec9b4f
KGP: Clean up configurations setup
...
KAPT classpath now uses extendsFrom in order to
resolve all configurations as a single graph.
Also, use Configuration.extendsFrom instead of
DependencyHandler.add that is being deprecated
in Gradle 6.7.
2020-11-17 10:44:15 +03:00
Ivan Gavrilovic
519aeeb644
KT-40140: Task configuration avoidance for Android projects
...
When adding Java sources to Kotlin task, avoid
force-configuring source-generating tasks in AGP.
Fixes https://youtrack.jetbrains.com/issue/KT-40140 .
Test: ConfigurationAvoidanceIT.testAndroidUnrelatedTaskNotConfigured
2020-11-17 10:43:48 +03:00
Yan Zhulanow
d376585821
IDE dependencies: Publish kotlin-coroutines-experimental-compat library
2020-11-17 10:29:21 +03:00
Vyacheslav Gerasimov
d7474bb2f7
Build: Use only @Exported & whitelisted classes for tools.jar api
...
This makes it stable between JDK vendors and versions
2020-11-17 01:21:00 +03:00
Alexander Likhachev
ac851523d8
[Gradle, MPP] Make KotlinCompileCommon task cc-compatible with warnings
...
Kotlin options are accessed via compilation. Compilation field is marked as transient and so not available after deserializing task from Gradle configuration cache.
Accessing 'isCompatibilityMetadataVariantEnabled' property via project in tasks 'onlyIf' causes Gradle to project instance serialization attempt that fails
(#KT-43141, #KT-43329) Fixed
2020-11-17 00:52:30 +03:00
Denis Zharkov
c6f46598ca
Set TARGET_BACKEND to JVM for failing irrelevant tests
2020-11-16 22:20:44 +03:00
Martin Petrov
68fdeaf865
Produce deterministic jar files.
...
This resets all timestamps present in jars produced by kotlinc.
This is important for build systems like bazel that rely on
deterministic outputs.
Before:
```
$ kotlinc ~/test.kt -d /tmp/a.jar
$ kotlinc ~/test.kt -d /tmp/b.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/a.jar
1ba022697317f796bd123fb4dc95418a18bcb51a /tmp/a.jar
6d2a2683470c24928f3fbd6768a4c57f55b0d196 /tmp/b.jar
$ unzip -l /tmp/a.jar
Archive: /tmp/a.jar
Length Date Time Name
--------- ---------- ----- ----
75 09-25-2020 16:48 META-INF/MANIFEST.MF
683 09-25-2020 16:48 TestKt.class
28 09-25-2020 16:48 META-INF/main.kotlin_module
--------- -------
786 3 files
```
After:
```
$ kotlinc ~/test.kt -d /tmp/a.jar
$ kotlinc ~/test.kt -d /tmp/b.jar
$ shasum /tmp/a.jar /tmp/b.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/a.jar
9ab80cd40c9293a7a66adf1154d4e6e9aa92d5b0 /tmp/b.jar
$ unzip -l /tmp/a.jar
Archive: /tmp/a.jar
Length Date Time Name
--------- ---------- ----- ----
75 12-31-1969 19:00 META-INF/MANIFEST.MF
590 12-31-1969 19:00 TestKt.class
36 12-31-1969 19:00 META-INF/main.kotlin_module
--------- -------
701 3 files
```
See https://github.com/JetBrains/kotlin/pull/3226 for a similar change.
2020-11-16 19:25:20 +01:00
Alexander Udalov
a3830b2611
JVM IR: copy corresponding property+annotations for DefaultImpls methods
...
Instead of using methodSignatureMapper which was an obsolete hack to
make accessor names "getFoo" instead of "<get-foo>".
In particular, this keeps the `@Deprecated` annotation on the
corresponding property, which results in ACC_DEPRECATED in codegen.
#KT-43326 Fixed
2020-11-16 19:15:49 +01:00
Alexander Udalov
5212ae6bbd
JVM IR: keep property annotations for inline class replacements
...
In particular, `@Deprecated` is not lost anymore and accessors of
deprecated property are generated with ACC_DEPRECATED just as in the old
backend.
#KT-43327 Fixed
2020-11-16 19:15:49 +01:00
Alexander Udalov
4ca60a2d7d
Fix warnings and some inspections in buildSrc
2020-11-16 19:15:43 +01:00
Denis Zharkov
22109e97d6
FIR: Unmute passing FirPsiCheckerTestGenerated.testJet53
2020-11-16 15:50:39 +03:00
Denis Zharkov
14305d1eba
FIR: Simplify callable references resolution
...
Also that fixes some bugs
2020-11-16 15:50:39 +03:00
Denis Zharkov
387fd895a6
FIR: Drop unused FirComposedSuperTypeRef
2020-11-16 15:50:39 +03:00
Denis Zharkov
ad35723f56
FIR: Simplify super-qualified calls resolution
2020-11-16 15:50:39 +03:00
Denis Zharkov
d4c7d4fc7c
FIR: Fix callable references resolution with stub receivers
...
Use stubReceiver as a receiver for fake calls
See issues KT-43358 KT-43359 KT-43378
2020-11-16 15:50:39 +03:00
Denis Zharkov
f97cc0b62d
FIR: Rework receivers processing in resolution
...
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity)
- Split CheckReceiver (dispatch part should only check nullability)
2020-11-16 15:50:39 +03:00
Denis Zharkov
e2099a0307
FIR: Fix false-positive successful resolution of call with lambda receiver
...
Do not try to integrate/postpone receiver expression to the base system
Receiver should be resolved independently anyway
2020-11-16 15:50:39 +03:00
Denis Zharkov
396e799e5d
FIR: Fix resolution for type-alias based SAM
2020-11-16 15:50:39 +03:00