Commit Graph

48633 Commits

Author SHA1 Message Date
Nicolay Mitropolsky e80a01a3fd 183: IDEA 183 version set to 183.2153.8 2018-09-06 12:49:00 +03:00
Sergey Igushkin 0ee19cf28f Support -Xcommon-sources in new MPP
In new MPP, add source sets taking part in more than one compilation to
the tasks' `commonSourceSet` in order to pass them as -Xcommon-sources

Issue #KT-26515 Fixed
2018-09-06 12:41:02 +03:00
Sergey Igushkin 5e6148c970 Refactor & fix: add allKotlinSourceSets and use it where appropriate
* Some of the usages of `kotlinSourceSets` should instead get all the
  source set from the source set hierarchies, i.e. including the ones
  transitively-participating in the compilation
2018-09-06 12:40:32 +03:00
Sergey Igushkin 96901c5487 Move KotlinSourceSet back to org.jetbrains.kotlin.gradle.plugin.*
After all MPP related changes, the `KotlinSourceSet` interface turns out
compatible with the old `KotlinSourceSet`, and, since there are external
usages of `KotlinSourceSet`, it is reasonable to expose the new
interface under the old FQ-name to fix those external usages.

Issue #KT-26498 Fixed
2018-09-06 12:35:59 +03:00
Sergey Igushkin 57c4886bd4 Don't create source sets and test compilation for the metadata target
Issue #KT-26253 In progress
2018-09-06 12:35:58 +03:00
Mikhail Zarechenskiy 5173a84dc7 Enable signed to unsigned coercion for modules with special capability
Mainly this is needed for Kotlin/Native part
2018-09-06 12:29:30 +03:00
Mikhail Glukhikh 55ff519aa8 Fix KtModifierListOwner.addAnnotation (case without modifier list)
Now add annotation to primary constructor should work correctly,
and may be some other related cases too.

Related to KT-25548
2018-09-06 11:10:05 +03:00
Mikhail Glukhikh 5f2c7d3c84 Do not report OPTIONAL_DECLARATION_USAGE_... in IDE for platform modules
#KT-26585 Fixed
Also fixes MultiPlatformHighlightingTestGenerated.testMultifileFacade
2018-09-06 11:07:21 +03:00
Nikolay Krasko ca1e0a4b88 Do not fetch Kotlin stubs for versioned files from multi-release jars (KT-26439)
An incomplete list of inner class files might be stored in versioned
directory and that ruins Kotlin stub building.

Another reason for excluding such files, that they are duplicated
in different declarations lists such as `Navigate -> Class...` action.

 #KT-26439 Fixed
2018-09-06 10:48:18 +03:00
Mikhail Zarechenskiy bc7f13b838 Temporarily allow equals & hashCode for SoF to compile bootstrap
equals & hashCode should be removed completely soon anyway
2018-09-06 10:39:34 +03:00
Mikhail Zarechenskiy 83975bd6ac Generate stub for specialized equals inside inline class 2018-09-06 10:39:33 +03:00
Mikhail Zarechenskiy b4674a172e Reserve secondary constructors with bodies inside inline classes
#KT-26575 Fixed
2018-09-06 10:22:01 +03:00
Mikhail Zarechenskiy 002a66fec1 Reserve box/unbox/equals/hashCode methods inside inline classes
#KT-26573 Fixed
2018-09-06 10:20:03 +03:00
Ilya Gorbunov 7f8863bfd0 Update public API after inline class generation schema was changed 2018-09-06 03:56:01 +03:00
Ilya Gorbunov 43eeccbcb8 Advance bootstrap to 1.3.0-dev-169 2018-09-06 03:55:02 +03:00
Vyacheslav Gerasimov e29151a1f0 Apply java plugin to kotlin-compiler project to fool idea import
java plugin makes idea import dependencies on this project as source (with empty sources however), this prevents reindexing of kotlin-compiler.jar after build on every change in compiler modules
2018-09-05 22:58:31 +03:00
Vyacheslav Gerasimov b868450e9a Make dependencies on :kotlin-compiler project testRuntimeOnly everywhere 2018-09-05 22:58:31 +03:00
Ilmir Usmanov 53a1526412 Add version to DebugMetadata
#KT-26580 Fixed
2018-09-05 22:51:55 +03:00
victor.petukhov e082fe19ea Actualize contracts diagnostic spec tests after 051ad0f79e 2018-09-05 18:04:58 +03:00
Mikhail Glukhikh ad27d9aae7 Package utils: implement getNonGeneratedKotlinSourceRoots
This is needed to prevent creation of actual elements
in generated sources. Checked manually.

#KT-24129 Fixed
2018-09-05 17:21:23 +03:00
Mikhail Glukhikh caee77cdae Kotlinize findOrCreateDirectoryForPackage in create actual fix
Before this commit, without existing directory
we tried to create it only inside Java source roots,
which is incorrect for JS and other non-JVM modules.
Source roots themselves still aren't created if they don't exist.

This fixes KT-19586 partially
2018-09-05 17:21:10 +03:00
Yan Zhulanow 3276e348cc Fix kapt tests (Kotlin version updated to 1.3) 2018-09-05 17:15:04 +03:00
Yan Zhulanow 17849473d6 Fix bunch compilation for AS 3.1/3.2 2018-09-05 17:15:04 +03:00
Dmitry Savvinov 051ad0f79e Fix unsound smartcast due to returns(null) in safecall
^KT-26382 Fixed
2018-09-05 16:27:48 +03:00
Dmitry Savvinov 18338f4ea3 Add test on safecall of function with returns(null) contract
Currently with non-desired testdata, fix incoming in the next commit.
2018-09-05 16:27:47 +03:00
Mikhail Glukhikh 1530a8bf53 Downgrade "Call chain -> sequence" to information level
Made to hide problem KT-26571
2018-09-05 14:55:23 +03:00
Roman Elizarov eac1f5f8c8 Bootstrap change to rename SuccessOrFailure to Result 2018-09-05 14:29:36 +03:00
victor.petukhov af732d16d6 Actualize contracts diagnostic spec tests 2018-09-05 14:08:50 +03:00
Mikhail Glukhikh bae92f3a33 Sealed class: handle the case with actual type alias #KT-26141 Fixed
Before this commit, class super-type could be sealed only in the case
it's the class we are inside or in the same file with.
However, it's quite possible for the expect sealed class
to be implemented by typealias.
So in this commit we allow class super-type to be sealed
if it's typealias expansion we are inside.
2018-09-05 13:25:49 +03:00
Mikhail Glukhikh 56d89266d4 Add tests for KT-26141 (yet without changes) 2018-09-05 13:10:03 +03:00
Mikhail Glukhikh 68e3821ae2 Code cleanup: packageUtils.kt 2018-09-05 13:05:08 +03:00
Mikhail Glukhikh 53e7778078 Add modifiers on the same line even after annotation #KT-26492 Fixed 2018-09-05 13:05:08 +03:00
Mikhail Glukhikh 4dd95e5640 Introduce OptionalExpectationInspection
It works at INFORMATION level only and is intended to form quick-fixes
to add relevant actual declarations.

#KT-25533 Fixed
2018-09-05 13:05:07 +03:00
Mikhail Glukhikh ba84c6adf3 Request focus while navigating to expected declaration #KT-18490 Fixed 2018-09-05 13:05:07 +03:00
Mikhail Glukhikh df125702c1 Test for KT-25040 (just to stabilize behaviour) 2018-09-05 13:05:07 +03:00
Mikhail Glukhikh 69def648c9 Remove deprecated MP extensions from Gradle menu #KT-22491 Fixed
Related to KT-26414
2018-09-05 13:05:06 +03:00
Mikhail Glukhikh 62e1121e7f Remove deprecated MP project builder from Gradle menu #KT-26414 Fixed 2018-09-05 13:05:06 +03:00
Dmitry Petrov db13ab59a6 Test: SuccessOrFailure calls don't generate erased class references 2018-09-05 12:20:57 +03:00
Dmitry Petrov 203fd6a5d6 Make inline class wrapper constructor synthetic 2018-09-05 12:20:57 +03:00
Dmitry Petrov 85826d304e Don't generate secondary constructors for inline class wrapper 2018-09-05 12:20:57 +03:00
Dmitry Petrov 65881dda97 Fix tests after rebase 2018-09-05 12:20:57 +03:00
Dmitry Petrov 1bf8cfca8b Test: property accessors are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov a2900282fd Call factory method for primary constructors of inner classes
We might want to add 'init' blocks later, so now, for the sake of
binary compatibility with 1.3-RC binaries, we have to generate these
'constructor' calls.

Note that in some tests inline class boxing is no longer redundant,
because resulting value is passed to 'constructor' as an argument.
2018-09-05 12:20:57 +03:00
Dmitry Petrov b1016936b2 'box'/'unbox' methods are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov 580b782585 Simplify code, make $Erased class package private 2018-09-05 12:20:57 +03:00
Dmitry Petrov 687b492bf9 Test: inline class secondary constructors are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov 05daa21657 Fix inline class secondary constructor call generation
Don't generate NEW+DUP for inline class constructor calls.
2018-09-05 12:20:57 +03:00
Dmitry Petrov 80a67477db Generate method calls for inline classes through IC, not IC$Erased
IC extends IC$Erased, so it should be fine.
2018-09-05 12:20:57 +03:00
Dmitry Petrov 3080b65f7d Inline (wrapper) class IC extends erased inline class IC$Erased 2018-09-05 12:20:57 +03:00
Sergey Bogolepov a46b28718e Add allScopes property to IrElementVisitorVoidWithContext 2018-09-05 09:56:48 +03:00