Commit Graph

66577 Commits

Author SHA1 Message Date
anastasiia.spaseeva 270972ca1c [Spec tests] Make main link nullable for case if implementation tests don't have this one 2020-05-22 02:52:00 +03:00
anastasiia.spaseeva 3a46b5a45a [Spec tests] Add path element at testMaps for main links also 2020-05-22 02:52:00 +03:00
anastasiia.spaseeva d94c212a60 [Spec tests] Add linkType element to testMaps 2020-05-22 02:51:59 +03:00
anastasiia.spaseeva 3a31150df4 [Spec tests] Metadata refactoring: remove duplicated links in testMaps 2020-05-22 02:51:58 +03:00
anastasiia.spaseeva d32aca87d1 [Spec tests] Change metadata structure of implementation and spec tests 2020-05-22 02:51:57 +03:00
Mikhail Likholetov 80cd26c9df [FIR] Support several annotation class diagnostics 2020-05-21 18:01:36 +03:00
Ilya Chernikov c112d37ac1 Consolidate resolving in the new lib, deprecate it in script-util
also deprecate Import and CompileOptions annotations, because they
do not seem generic enough. Create specific copie in the main-kts
instead.
2020-05-21 16:49:57 +02:00
Ilya Chernikov 7d426226f9 Switch example to the new maven resolving API 2020-05-21 16:49:56 +02:00
Ilya Chernikov f363134fbc Do not continue compilation if collected dependencies contain error
avoids additional errors reported by compilation, if configuration
refinement returned error
2020-05-21 16:49:56 +02:00
Ilya Chernikov d92e4d28f5 Provide a method to update script definitions after loading into IDE
also documenting ScriptDefinitionsProvider
2020-05-21 16:49:56 +02:00
Ilya Chernikov 4b032a14af Refactor host configuration handling and script definition creation
so it is possible now to create custom host configuration with template
and all configurations are handled consistenly.
Also introduce and use new ScriptDefinition class wrapping compilation
and evaluation configurations, that could be consistenly created from a
template.
2020-05-21 16:49:55 +02:00
Ilya Chernikov 255ad47406 Use copied key to extract default jdkHome from host configuration 2020-05-21 16:49:55 +02:00
Ilya Chernikov 20bbcd5d5a Implement copied key with ability to take default from source config 2020-05-21 16:49:55 +02:00
Ilya Goncharov 3c9207a2cd [Gradle, JS] Add test on local project dependency
#KT-38592 fixed
2020-05-21 17:36:33 +03:00
Ilya Goncharov 985623eac5 [Gradle, JS] Fix hmpp on only js
#KT-38592 fixed
2020-05-21 17:36:33 +03:00
Ilya Goncharov bed7b23d6c [Gradle, JS] Fix naming of test and test data
#KT-38592 fixed
2020-05-21 17:36:33 +03:00
Ilya Goncharov d089bbe14a [Gradle, JS] Fix for JsIrTarget in mixed mode
#KT-38592 fixed
2020-05-21 17:36:33 +03:00
Ilya Goncharov 79984b6e04 [Gradle, JS] Add test on hmpp with both js
#KT-38592 fixed
2020-05-21 17:36:33 +03:00
Ilya Goncharov a6812e5d6a [Gradle, JS] Add fake common usage context for single js plugin publish
#KT-38592 fixed
2020-05-21 17:36:33 +03:00
Ilya Goncharov 4f747072f4 [Gradle, JS] Define fake configuration for single js plugin to publish as common
#KT-38592 fixed
2020-05-21 17:36:32 +03:00
Ilya Goncharov 22f5d3b134 [Gradle, JS] Add isMpp property
#KT-38592 fixed
2020-05-21 17:36:32 +03:00
Pavel Kirpichenkov 0b33e9430b [NI] Report unstable smart cast directly instead of using SmartCastManager
Fix compilation errors, revealed by this fix.

SmartCastManager is unnecessary for error reporting, intermediate diagnostics from the NI contain all required infromation.
When SmartCastManager is used it leads to missing unstable smart casts in case of expressions with captured types.
This happens, because data flow info is recorded for original expression without captured types, which is used as a key.
DataFlowValues created from receivers with captured types can't be used to retrieve that info.

^KT-39010 Fixed
2020-05-21 17:09:10 +03:00
Dmitry Gridin b808d5f381 TrailingCommaInspection: cleanup code 2020-05-21 13:42:30 +00:00
Dmitry Gridin ee141ae57b TrailingCommaInspection: add dependency to settings
* Change severity to `INFO`
* Mark useless comma as unused symbol
* Add dependency on `Use trailing comma`

#KT-39069 Fixed
#KT-38568 Fixed
2020-05-21 13:42:29 +00:00
Ilya Matveev 8d77ec83c6 [Gradle, native] Don't set system properties when the compiler runs in daemon
Changing system properties during parallel in-process compiler
execution may cause data races (e.g. see KT-37362, KT-37442).

This commit abandons using system properties when the compiler
is executed in process.

Issue #KT-37550 fixed
2020-05-21 12:05:24 +00:00
Ilya Matveev f88722ae76 Update K/N: 1.4-M3-dev-15627 2020-05-21 12:05:23 +00:00
Roman Golyshev a83b0bef96 KT-38841 Do not call preparePsiElementForWrite if not needed
- This call breaks Intention Preview for all intentions that extend
`SelfTargetingIntention`
- This check is actually already performed by the platform before the
intention invocation (but only if `startInWriteAction` returns `true`)
- There are many other intentions which redundantly use this call, but
most of them implement `LocalQuickFix`, which means that they are
inspection based. Currently Intention Preview does not seem to support
this kind of intentions
2020-05-21 11:45:48 +00:00
Dmitry Petrov b89878a509 Update testData for KAPT tests for new inline class ABI
Since class member functions returning inline class values are now
mangled, they are not visible from Java.
2020-05-21 13:56:57 +03:00
Jinseong Jeon 7a947e8008 FIR: fix default constructor visibility for enum entry. 2020-05-21 08:40:03 +03:00
Jinseong Jeon 0d3301b695 FIR: resolve local class in anonymous initializer. 2020-05-21 08:36:49 +03:00
Mikhail Zarechenskiy 2ff5b253ae [NI] Fix suspend conversions for subtypes of functional types
Fix for recently added tests:
  - testIntersectionTypeToSubtypeConversion
  - testSubtypeOfFunctionalTypeToSuspendConversion
2020-05-21 00:47:12 +03:00
Roman Golyshev 3903814c9c Revert "KT-38841 Remove redundant preparePsiElementForWrite call"
This reverts commit 165b62da

Something went wrong with the AS40 build
2020-05-20 22:58:49 +03:00
Victor Petukhov 12db3d6e83 NI: remove separation of variable fixation order by constraint kind
The commit partially reverts ec4d9d2f1f

^KT-37914 Fixed
2020-05-20 22:37:30 +03:00
Dmitry Petrov 874fa5b998 Bootstrap: 1.4.0-dev-8798 2020-05-20 18:02:11 +03:00
Roman Golyshev 165b62da63 KT-38841 Remove redundant preparePsiElementForWrite call
- This call breaks Intention Preview for all intentions that extend
`SelfTargetingIntention`
- This check is actually already performed by the platform before the
intention invocation
- There are many other intentions which redundantly use this call, but
most of them implement `LocalQuickFix`, which means that they are
inspection based. Currently Intention Preview does not seem to support
this kind of intentions
2020-05-20 14:33:21 +00:00
Steven Schäfer 933440dc63 JVM IR: Fix mangling of @JvmStatic internal function in companion objects 2020-05-20 15:57:03 +02:00
Vladimir Dolzhenko 2d0445ebaa Add klib extension to ARCHIVE fileType
Fixed to #KT-38767
Relates to #KT-38571
2020-05-20 13:24:11 +00:00
Mikhail Zarechenskiy fceaf65729 [NI] Don't compute conversions for definitely not SAM parameter 2020-05-20 15:30:14 +03:00
Mikhail Zarechenskiy 8bdc4d34f7 [NI] Commonize type-conversions (SAM/Suspend)
- Allow participating subtypes of functional types in conversions
 - Fix several subtle inconsistencies
 - Place logic about conversions at one place

 Now conversions operations have two stages: before usual subtyping
 check and after one. This is needed to support conversions of
 subtypes (of functional types, for example). First, the compiler
 checks if it possible to resolve an argument without conversion and
 only then it tries to perform conversion.
 Note that it'd be incorrect to perform conversion eagerly as it can
 change resolve (Runnable & () -> Unit <: KRunnable), plus we can't
 guess whether conversion is needed at all as it's important not to
 look into supertypes if resolution doesn't actually needed it

 #KT-36448 Fixed
 #KT-37574 Fixed
 #KT-38604 Fixed
2020-05-20 15:30:14 +03:00
Mikhail Zarechenskiy f702da5c51 [NI] Small refactoring around type conversions 2020-05-20 15:30:13 +03:00
Mikhail Zarechenskiy d3d162f9c8 Refactoring: start commonization of type-conversions 2020-05-20 15:30:13 +03:00
Mikhail Zarechenskiy cce9646c7d Refactoring: extract method about SAM conversions out 2020-05-20 15:30:13 +03:00
Mikhail Zarechenskiy 372f378edc [NI] Support nested transactions inside constraint system 2020-05-20 15:30:13 +03:00
Kevin Most 4f26ac9a04 Fix "Koltin" typos throughout codebase (#3383)
* Fix "Koltin" typos throughout codebase

* Update K2MetadataKlibSerializer.kt
2020-05-20 15:12:32 +03:00
Sergey Igushkin 38fd9c3d1a Fix KT-39063 by not adding extendsFrom with metadata configurations
Issue #KT-39063 Fixed
2020-05-20 14:31:36 +03:00
Dmitry Petrov 6fcdab23cc Bootstrap: 1.4.0-dev-8774 2020-05-20 13:47:39 +03:00
Vladimir Dolzhenko 88efac00b3 Disable klib fileType in lue of KLibFileTypeFactory
Relates to #KT-38767
Relates to #KT-38571
2020-05-20 10:07:03 +00:00
Toshiaki Kameyama 081d6c1dff Useless call on collection: propose 'Replace with toList()' instead of 'Remove useless call' if receiver is array type
#KT-38961 Fixed
2020-05-20 12:46:23 +03:00
Ilya Chernikov 994897cee9 Fix textdata after reverting a commit about CompilerMessageLocation 2020-05-20 10:37:56 +02:00
Ilya Kirillov d825428718 New J2K : move resolve resolve out of EDT in shorten references processing
relates to #KT-31812
2020-05-20 11:11:46 +03:00