Commit Graph

48248 Commits

Author SHA1 Message Date
Mikhael Bogdanov 367ab5470c Minor. Code clean 2018-08-24 20:22:32 +02:00
Mikhael Bogdanov 4687381179 Convert AbstractLineNumberTest.java to Kotlin 2018-08-24 20:17:25 +02:00
Mikhael Bogdanov c28b9f75e3 Rename .java to .kt 2018-08-24 20:17:24 +02:00
Mikhael Bogdanov de02e97f39 Print generated bytecode on AbstractCheckLocalVariablesTableTest fail 2018-08-24 20:17:23 +02:00
Mikhael Bogdanov 9a1b2daa12 Minor. Code clean 2018-08-24 20:17:21 +02:00
Mikhael Bogdanov f06b6ed47e Convert AbstractCheckLocalVariablesTableTest.java to Kotlin 2018-08-24 20:17:20 +02:00
Mikhael Bogdanov 614fad016f Rename .java to .kt 2018-08-24 20:17:19 +02:00
Mikhael Bogdanov 232170b72a Migrate AbstractIrCheckLocalVariablesTableTest to CodegenTestCase stuff 2018-08-24 20:17:18 +02:00
Alexander Udalov ba111d58ae Report error on .class files produced by Kotlin 1.3-M1
Advance incremental cache version to force rebuild after switching from
1.3-M1 to 1.3-M2
2018-08-24 18:49:55 +02:00
Cuihtlauac ALVARADO 813d7ff84a Remove useless parameter
It seems a candidate is added either when requiresExtensionReceiver is true and
receiver is not null or when requiresExtensionReceiver is false and receiver is null.
Consequently, f appears useless.
2018-08-24 18:48:03 +03:00
Cuihtlauac ALVARADO eb7d77ebd9 Accept renaming and formating requests
* Rename "resolve" into "resolveCandidates"
* Use multi-line formatting for formal parameters
* Move ")" down one line at call sites
2018-08-24 18:48:03 +03:00
Cuihtlauac ALVARADO bf08755969 Factor duplicated code.
Move SimpleScopeTowerProcessor from TowerResolver into ScopeTowerProcessors.

Lift code duplicated in functions:

  * ExplicitReceiverScopeTowerProcessor.simpleProcess()
  * QualifierScopeTowerProcessor.simpleProcess()
  * NoExplicitReceiverScopeTowerProcessor.simpleProcess()

into AbstractSimpleScopeTowerProcessor. Turn it into a function and call it
in the various context. Incidentally, now useless functions resolveAsMember()
and resolveAsExtension() are  removed.
2018-08-24 18:48:03 +03:00
Alexey Sedunov 7ae740dd91 MPP: Add tests for new MPP model import 2018-08-24 18:00:57 +03:00
Mikhail Glukhikh ded652382b "Deferred result not used": report all Deferred results by default
#KT-26181 Fixed
2018-08-24 18:00:56 +03:00
Mikhail Glukhikh 564ea629d1 Add annotations to primary constructor together with 'constructor'
This fixes incorrect behaviour if primary constructor has no explicit
'constructor' keywork
#KT-25548 Fixed
2018-08-24 18:00:54 +03:00
Mikhail Glukhikh c12f29ae30 Enhance inspection about SuccessOrFailure (related to KT-25621)
Increase performance by searching first SuccessOrFailure/runCatching/etc
in text of functions without return type.
Remove stdlib false positives, like success() & failure().
For catching extension, check also non-catching members.
Add "rename to *Catching" fix.
2018-08-24 18:00:46 +03:00
Mikhail Glukhikh 7a2d0a3bb2 Add inspection "Redundant runCatching {}" (related to KT-25621) 2018-08-24 18:00:44 +03:00
Mikhail Glukhikh 2084e94099 Add quick-fix "add .getOrThrow()" for SuccessOrFailure inspection
#KT-25621 Fixed
2018-08-24 18:00:42 +03:00
Mikhail Glukhikh 87d750aa1c Add inspection to detect functions with SuccessOrFailure return type
Partial implementation of KT-25621 (no quick-fixes yet)
2018-08-24 18:00:41 +03:00
Ivan Gavrilovic 48784fd95e Use new API for getting the raw Android resources
A new method has been added in the Android Gradle
plugin 3.3.0. This commit switches from ussing the
MergeResources task, and uses getAllRawAndroidResources
API instead.

Test: manually verified
2018-08-24 17:28:40 +03:00
Roman Artemev 5dcb02466a Update test data 2018-08-24 15:49:13 +03:00
Roman Artemev 2e5940e46d [JS IR BE] Fix object instance reference
* set it in primary constructor prior to constructor body
2018-08-24 15:49:13 +03:00
Roman Artemev 85a8af13cf [JS IR BE] Fix constructor parent 2018-08-24 15:49:13 +03:00
Georgy Bronnikov 30a2058f74 Fix JVM_IR backend crashes when compiling for Android
^KT-23963 Fixed
^KT-23968 FIxed
^KT-23972 Fixed
2018-08-24 15:46:44 +03:00
Roman Artemev cc14442be1 Add tests for primitive companion object
Update test data
2018-08-24 14:58:42 +03:00
Roman Artemev 450ed63690 [JS IR BE] Implement primitive companion object 2018-08-24 14:58:42 +03:00
Dmitry Petrov 2a524920a5 Don't remap inline function args requiring inline class boxing/unboxing
Same as for primitives: inline lambda expects to see a boxed value,
so, even if an argument is a local variable, it can't be remapped,
because it contains unboxed representation.
2018-08-24 14:52:29 +03:00
Dmitry Petrov 6e2d05cd94 Fix argument original type order in InlineCodegen
Arguments are put on stack in the direct order, and then stored into
local variables for inlining in the reversed order:

    <arg0>
    <arg1>
    <arg2>
    store <param2>
    store <param1>
    store <param0>

Original value parameter types were taken in direct order, though.
2018-08-24 14:52:29 +03:00
Mikhael Bogdanov 25b32b8e1d Migrate AbstractLineNumberTest to CodegenTestCase stuff 2018-08-24 13:39:22 +02:00
Alexander Udalov 9c68f2be36 Advance metadata versions and JVM bytecode version
JVM versions are increased in order to differentiate pre-1.3-M2 .class
files where signatures mentioning inline classes were not mangled. Other
versions are increased in case something similar will need to be
detected
2018-08-24 13:01:53 +02:00
Georgy Bronnikov 50e8f7efc7 Track fake overrides for IrField 2018-08-24 13:41:52 +03:00
Yan Zhulanow 01d5e227f0 Pill: Fix resource roots importing 2018-08-24 15:29:55 +05:00
Yan Zhulanow b7873edf30 Pill: Fix issue with clashing sdk-common.jar and sdk-common-26.1.2.jar
Move sdk-common.jar to the end of the classpath
2018-08-24 15:29:55 +05:00
Yan Zhulanow 267e239e52 Pill: Refactoring, introduce a generic predicate in DependencyMapper 2018-08-24 15:29:55 +05:00
Denis Zharkov 83a431fca3 Introduce redundant enum CoroutineSingletons in experimental.intrinsics 2018-08-24 10:55:12 +03:00
Yan Zhulanow bda14fcbb2 Unresolved reference not reported on data class constructor @get annotation (KT-19628) 2018-08-24 04:28:16 +05:00
Yan Zhulanow 463f8dae6a Pill: Add '-ea' option to the default JUnit configuration if missing 2018-08-24 04:28:15 +05:00
Yan Zhulanow b145c97b37 Kapt: Restore line mappings correctly for nested classes and its members 2018-08-24 04:28:13 +05:00
Yan Zhulanow 2328cecffe Minor: Add kotlinx-metadata and kotlinx-metadata-jvm to Pill 2018-08-24 04:28:12 +05:00
Yan Zhulanow c83581e6b8 Kapt: Strict mode. Issue an error if the converter fails to process a class (#KT-25518, #KT-24272) 2018-08-24 04:28:11 +05:00
Yan Zhulanow ef210d7122 Kapt: Do not write references to anonymous classes to stubs & metadata (#KT-25374) 2018-08-24 04:28:09 +05:00
Yan Zhulanow 43f5971863 Remove unneeded 'idea-full' dependency from compiler plugin test runtime classpath 2018-08-24 04:28:08 +05:00
Yan Zhulanow 834ece7d63 Debugger: Remove type checking in file ranking calculator
Type checking makes checking slower and less stable.
2018-08-24 04:28:07 +05:00
Yan Zhulanow d0fd74982d Parcelize, Minor: Fix tests (writeToParcel/describeContents are not final anymore) 2018-08-24 04:28:06 +05:00
Yan Zhulanow d08a32c7cb Kapt: Ignore annotation-processing-gradle compiler plugin we got from Gradle (KT-24714)
Cause it's built for the shaded Kotlin compiler and won't work with JPS.
2018-08-24 04:28:05 +05:00
Yan Zhulanow 8c05769745 Parcelize: Fix infinite recursive loop for zero-parameter Parcelable classes (KT-25839) 2018-08-24 04:26:36 +05:00
Alexander Udalov 475a80b641 Do not write pre-release binaries for stable LV
This commit reverts f6571effcc and
reimplements the desired logic in another way.

In particular, we'd like these two conditions to hold:
1) only the release compiler with stable language settings (meaning,
   language version is a released version of Kotlin and no experimental
   features are enabled) should report errors when _reading_ pre-release
   binaries.
2) the compiler should _write_ pre-release binaries only if language
   settings are not stable, independent of whether the compiler itself
   is release or not.

From these conditions it follows that we must use different logic to
determine how to behave when reading/writing pre-release binaries.
Namely, reading (in CompilerDeserializationConfiguration) now checks if
both the compiler is release and the language settings are stable, and
writing (in LanguageVersionSettings.isPreRelease) checks only that the
language settings are stable
2018-08-23 23:11:30 +02:00
Vyacheslav Gerasimov 053a4b714c Refactor :kotlin-compiler project to allow project(":kotlin-compiler") dependencies 2018-08-23 21:55:26 +03:00
Mikhail Glukhikh 023b1b1880 Shorten quick-fix text of "Redundant async" #KT-25712 Fixed 2018-08-23 18:35:01 +03:00
Mikhail Glukhikh 3dc2c07b23 Simplify description of "Deferred result not used" #KT-25711 Fixed 2018-08-23 18:35:00 +03:00