Commit Graph

63359 Commits

Author SHA1 Message Date
Dmitriy Dolovov 80f2c091b4 IDE perf tests for K/N: keep Kotlin & Gradle versions in *.properties 2020-03-06 10:14:34 +07:00
Dmitriy Dolovov c4a89c0201 IDE perf tests for K/N: check successful Gradle project import 2020-03-06 10:14:28 +07:00
Steven Schäfer bb5a639153 JVM IR: Turn static callable references into singletons 2020-03-05 22:19:53 +03:00
Pavel Kirpichenkov ac5c255c20 [NI-TESTS] Add regression tests
^KT-33638 Obsolete

Add test for case mentioned in KT-33629.
Used to be runtime failure instead of error diagnostic.
2020-03-05 20:20:47 +03:00
Pavel Kirpichenkov dc42b20ae3 [NI] Use alternative to intersection type in public declarations
The new inference uses inferred intersection types normally, unlike the old inference.
However, intersection types in public declarations are approximated to supertype, which
potentially may give a less presice type, then it would be with the OI.
For non-related T1, T2 the NI approximates {T1 & T2} to Any in public declarations,
and if the OI was inferring T1 instead of the intersection type, it may lead to
less precise declaration type and related errors.

The solution is to remember an alternative for an intersection type when present.
Before approximation the alternative replaces the intersection type.

^KT-36249 Fixed
2020-03-05 20:20:47 +03:00
Dmitry Petrov 4038c758ca KT-37131 Record default arguments in argument adaptation
Also, don't adapt argument when expected type is base reflection type
(KCallable<T>, etc), since such types don't contain parameter types.
2020-03-05 19:32:39 +03:00
Vyacheslav Gerasimov 7c7245fbb9 Build: Add compiler.version to embedded in JPS sync 2020-03-05 18:10:17 +03:00
Vyacheslav Gerasimov 1cb52861b1 Build: Set captureTaskInputFiles for buildScan 2020-03-05 18:05:54 +03:00
Vyacheslav Gerasimov c77130d0f3 Build: Add test for reporting all gradle build cache misses
`kotlin.build.cache.check.enabled` will be used for cacheability testing
on teamcity
2020-03-05 18:05:54 +03:00
Vyacheslav Gerasimov b3f16cfc96 Build: Add test for dist artifacts manifests and compiler.version 2020-03-05 18:05:53 +03:00
Vyacheslav Gerasimov ebb75813f9 Build: Don't disable incremental compilation for CI
Using different incremental setting for KotlinCompile makes impossible
using caches built on CI since it is marked as @Input. Same property for
JavaCompile marked as @Internal.
We do clean checkout now so it shouldn't matter but we want to build
incrementally in some cases for Dev builds on CI.
2020-03-05 18:05:53 +03:00
Vyacheslav Gerasimov bab87c9837 Build: Extract compiler version to separate module to improve caching
Compiler version changes every build and makes impossible to reuse
caches for heavy tasks such as compiler proguard. We may fix that by
adding version module directly to the final jar.
2020-03-05 18:05:53 +03:00
Vyacheslav Gerasimov c2457cae60 Read KotlinCompilerVersion from resource file
Writing build number into a public constant field leads to poor gradle
cache reuse between different builds. Public constant value is a part of
public api and its changes affect inputs of dependent modules.
Extracting build number to resource file allows to ignore it from
runtime classpath which fixes same problem for KotlinCompile tasks
2020-03-05 18:05:53 +03:00
Vyacheslav Gerasimov f8437743c5 Build: Ignore META-INF/MANIFEST.MF from classpath normalization
We are writing build numbers there which breaks caching
2020-03-05 18:05:52 +03:00
Abduqodiri Qurbonzoda d5c851980c String.toBoolean() should be String?.toBoolean() #KT-14119 2020-03-05 17:53:29 +03:00
Dmitry Savvinov b8b1dd753c Add builtins_platform property to klib manifest 2020-03-05 17:27:38 +03:00
Dmitry Savvinov 8fcd98639d Minor: merge HierarchicalExpectActualMatchingTests into MultiplatformHighlightingTests 2020-03-05 17:27:19 +03:00
Konstantin Tskhovrebov 9eab75650c Remove target name from gradle test filters.
Issue #KT-36909 Fixed
2020-03-05 17:14:49 +03:00
Abduqodiri Qurbonzoda a32f742893 Inherit ReadWriteProperty from ReadOnlyProperty #KT-27729 2020-03-05 16:53:02 +03:00
Dmitriy Novozhilov 3742586209 [FIR-TEST] Unmute some blackbox tests 2020-03-05 16:48:48 +03:00
Dmitriy Novozhilov 2bce279a9e [FIR] Support smartcasts from lhs of boolean operator with jump in rhs 2020-03-05 16:48:48 +03:00
Dmitriy Novozhilov e3e7b40f85 [FIR] Fix determining coercion to Unit 2020-03-05 16:48:48 +03:00
Dmitriy Novozhilov 770dfb69ba [FIR] Analyze all statements in block except last one in independent mode
Some broken tests will be fixed in next commit
#KT-37176 Fixed
2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov 1c728e8184 [FIR] Fix return expressions calculator
There was a problem that if las statement of lambda was a return
  expression from that lambda then result of return counted twice
2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov 5f9876479e [FIR] Add saving of local context in anonymous functions for further resolve
#KT-37066 Fixed
2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov 8023d04c61 [FIR] Add separate local scope for init blocks 2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov 50742a4686 [FIR] Move local scopes immutable 2020-03-05 16:48:47 +03:00
Dmitriy Novozhilov 25dc9f948a Revert "[FIR] Support deserialization of annotations on JVM"
This is needed because of that commit tragically decreases performance,
  so this changes will be delayed for now
2020-03-05 16:48:47 +03:00
Leonid Startsev a2c24e696f Leverage existing psi2ir function declaration generator in plugin
This seems to be the only reasonable way to provide function declarations with
_correctly_ substituted type parameters without rewriting logic from scratch;
correctly scoped type parameters in IR are now required in serialization
plugin by all backends.

Also fix some missing upper bounds.
2020-03-05 16:40:55 +03:00
Abduqodiri Qurbonzoda fc22cfa896 String.format does not support no locale #KT-22932 2020-03-05 16:38:43 +03:00
Alexander Udalov f4d53c18a1 Fix JarContentTest by adding dependency on jar creating task
Otherwise tests could be run before the final jar was created and stored
to `build/libs`.
2020-03-05 14:36:24 +01:00
Alexander Udalov 505ec072bb Remove dependency of JarContentTest on JDK 8
It turns out that `jvmTarget` and `javaHome` settings in
build.gradle.kts were changing the module settings and affected the
compilation of kotlinx-metadata-jvm sources. The correct way to use JDK
8 in tests would be to change JVM target / JDK home of the specific
KotlinCompile task via its `kotlinOptions`, but JarContentTest doesn't
need JDK 8 anyway at this moment, so simplify that instead.
2020-03-05 14:36:23 +01:00
Vladimir Dolzhenko d1a29df581 Revert "Added AllowNullableArrayArgsInMain (1.4+) language setting"
#KT-35965 Fixed
2020-03-05 14:08:27 +01:00
Alexander Udalov 0f7122a88a Support MutablePropertyReferenceN supertypes in LambdaInfo
#KT-37087 Fixed
2020-03-05 14:01:30 +01:00
Alexander Udalov 058c6bc578 Minor, reformat and slightly refactor JvmRuntimeTypes.kt 2020-03-05 14:01:29 +01:00
Alexander Udalov 8588f96ec8 Fix inspections in kotlin.jvm.internal runtime classes 2020-03-05 14:01:29 +01:00
Alexander Udalov aaff1d1670 Minor, add ReadMe to spec-docs 2020-03-05 14:01:13 +01:00
Mikhail Glukhikh 5af4efd5a7 Remove FIR test data file accidentally left in 8884cbe4 2020-03-05 15:51:41 +03:00
Mikhail Glukhikh db38dfc21b Diagnostic test: make messages about FIR_IDENTICAL inconsistency clearer 2020-03-05 09:41:07 +03:00
Mikhail Glukhikh 737c91c5cf FIR test merging: compare diagnostic files symbol-by-symbol 2020-03-05 09:40:45 +03:00
Mikhail Glukhikh 48d30daa47 Diagnostic tests: don't create '.fir.kt' file if FIR_IDENTICAL 2020-03-05 09:40:24 +03:00
Mikhail Glukhikh 951fb0b7e7 Move loadTestDataWithoutDiagnostics to FirTestUtils 2020-03-05 09:40:02 +03:00
Mikhail Glukhikh 8884cbe415 Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed 2020-03-05 09:39:40 +03:00
Georgy Bronnikov 186e0b0cba Do not call IR backend when there's a script involved 2020-03-05 09:23:13 +03:00
Kirill Shmakov 03c6f13831 Add fallback value in K/N version computation 2020-03-05 08:35:34 +03:00
Alexander Udalov 3a4e540d44 Minor refactoring and style fixes in JarContentTest
Inline unnecessary members, remove commented code, refactor according to
the style guide, some other minor improvements
2020-03-05 02:25:00 +01:00
Jinseong Jeon 79790ca227 Avoid uses of plain "kotlin" in metadata deserialization.
KT-35587 Fixed
2020-03-05 02:22:36 +01:00
Vyacheslav Gerasimov 744c4c545e Build: Make DexMethodCount task cacheable, extract print stats to task 2020-03-05 00:47:52 +03:00
Ilmir Usmanov 354fb3c4ba JVM_IR: Generate fake continuations and their constructors as public
#KT-37093 Fixed
2020-03-04 21:32:35 +01:00
Ilmir Usmanov c94f8d3767 JVM_IR: Do not generate nullability annotation for synthetic result field
of continuation class.
 #KT-37084 Fixed
2020-03-04 21:32:34 +01:00