Commit Graph

44946 Commits

Author SHA1 Message Date
Toshiaki Kameyama 488e5e9f60 Do not suggest "redundant toInt() call" for comparison receiver
So #KT-23133 Fixed
2018-04-03 19:49:31 +03:00
Toshiaki Kameyama f91819ace7 "Simplify boolean expression": handle Boolean? comparison correctly
So #KT-23377 Fixed
2018-04-03 19:49:31 +03:00
Dmitry Jemerov a495c2e5ea Don't run analysis in SpecifyTypeExplicitlyIntention.isAvailable()
If type is invalid, show error hint when action is invoked
2018-04-03 18:37:33 +02:00
Mikhail Glukhikh 6d9457853e Fix handling of characters in "convert to string template"
So #KT-23045 Fixed
So #KT-23046 Fixed
2018-04-03 18:26:25 +03:00
Alexander Udalov d0e99e9a3f Fix NPE from JarURLConnection.getUseCaches when loading compiler plugins
#KT-22513 Fixed
2018-04-03 16:55:48 +02:00
Mikhail Glukhikh 2125c42328 Make DeprecatedCallableAddReplaceWithInspection applicability based
Removes intention version of the same thing
Includes some optimization of 'Deprecated' annotation detection
2018-04-03 17:46:27 +03:00
Mikhail Glukhikh ab973b2ff0 Fix several false positives and make safer "redundant companion ref"
Don't report it on an import directive #KT-23520 Fixed
Don't report it if companion nested class is referenced #KT-23519 Fixed
Check companion reference both by descriptor and by name
2018-04-03 17:45:14 +03:00
Mikhail Glukhikh 23488fac56 Optimization: RedundantCompanionReferenceInspection 2018-04-03 17:30:46 +03:00
Alexander Udalov 964bf503a6 Fix warning about kotlin-reflect-api bundling Kotlin Runtime
This fixes the "Some JAR files in the classpath have the Kotlin Runtime
library bundled into them" warning when compiling all modules that
depend on kotlin-reflect-api. This warning is reported on jars in the
classpath which look like standard library artifacts, but in fact are
not because their manifest does not say so. With this change, we're now
writing the manifest of standard library artifacts to the resulting jar
of kotlin-reflect-api, with the standard library component name
"internal" (in fact, it doesn't affect anything here, any name would be
OK) to make the compiler believe that this is actually a standard
library jar
2018-04-03 13:18:56 +02:00
Nicolay Mitropolsky 14ce13315c Uast: wrapping expression bodies with return and code block (#KT-23557) 2018-04-03 14:10:01 +03:00
Mikhail Glukhikh 66d134ef5c "Can be private" inspection: don't analyze data class parameters
So #KT-23566 Fixed
2018-04-03 13:44:37 +03:00
Yan Zhulanow dc3cd01fad Kapt: Find the right annotation descriptor in case of repeatable annotations (#KT-23427) 2018-04-03 00:16:54 +03:00
Yan Zhulanow 4cab250f72 Pill: Add marker option for JUnit3RunnerWithInners test runner 2018-04-02 19:26:39 +03:00
Yan Zhulanow 46973bf1fe Kapt: Do not escape cyrillic letters in stubs (#KT-23286) 2018-04-02 19:26:37 +03:00
Yan Zhulanow ae3d574473 Pill: Support Android tests 2018-04-02 19:26:35 +03:00
Yan Zhulanow ead7653f84 Minor: Fix Parcelable test data 2018-04-02 19:26:34 +03:00
Yan Zhulanow 78f2fe1eab Pill: Add idea-android-output-parser module to JPS model 2018-04-02 19:26:32 +03:00
Yan Zhulanow 5d9bdbec10 Tests: Disable inspections after test as Platform test framework requires 2018-04-02 19:26:30 +03:00
Yan Zhulanow 8f02d338a6 Android: Extract dependencies to Android plugin to extensions 2018-04-02 19:26:28 +03:00
Yan Zhulanow 39e9d28c63 Kapt: Support 'kapt.kotlin.generated' option in Maven 2018-04-02 19:26:26 +03:00
Yan Zhulanow b1d7935d4a Kapt: Annotation processors should not be discovered when the processor fqNames are set by user (#KT-22939) 2018-04-02 19:26:24 +03:00
Yan Zhulanow dc8eb7446f Kapt, minor: make Gradle API a bit cleaner 2018-04-02 19:18:45 +03:00
Yan Zhulanow b3fbec9ec3 Fix EA-117939: Add a read action 2018-04-02 19:17:56 +03:00
Yan Zhulanow 81f3346329 Evaluate: Fix annotation value evaluation (#KT-23058) 2018-04-02 19:16:46 +03:00
Yan Zhulanow 4d13e38948 Show warning alert when the installed Kotlin plugin version is incompatible with the IDE platform version 2018-04-02 19:16:16 +03:00
Yan Zhulanow b664177bd5 EA-100549: Throw an exception with an additional data instead of Java assertion 2018-04-02 19:16:03 +03:00
Yan Zhulanow ec0abb0854 Fix EA-79206: Process only valid layout .xml files in Android Extensions 2018-04-02 19:15:48 +03:00
Yan Zhulanow c8a1517190 Fix EA-113820: Accept also nullable elements in 'getRelevantElement()' 2018-04-02 19:15:33 +03:00
Yan Zhulanow 2b0489529d Fix compatibility for compiler API in DeclarationAttributeAltererExtension (EA-114961) 2018-04-02 19:14:52 +03:00
Yan Zhulanow ff4cdfb43e Remove "New Kotlin Activity" action as Android plugin can generate it by itself (#KT-22845, EA-114706) 2018-04-02 19:14:40 +03:00
Yan Zhulanow 966480a155 Debugger: A dirty fix for setting breakpoints inside finally {} in case if exception is thrown from try {} (#KT-22654) 2018-04-02 19:14:28 +03:00
Yan Zhulanow eec9c6bffa Debugger: Fix breakpoints and stepping for inline-only function lambda arguments (#KT-23064) 2018-04-02 19:14:14 +03:00
Alexey Sedunov ae37cc30a1 JS: Use the same output paths for JPS and Maven-based builds
#KT-22586 Fixed
2018-04-02 15:28:35 +03:00
Elifarley C 1b3d539a25 toBigDecimal: Avoid creating new BigDecimal instance for some values
Avoid creating new `BigDecimal` instance by calling `BigDecimal.valueOf(this)`, which doesn't create a new instance if the argument falls in the range [0..10].
(there's a `private static final BigDecimal[] zeroThroughTen` cache in BigDecimal.java with 11 BigDecimal instances)
2018-04-02 15:26:49 +03:00
Mikhail Zarechenskiy e1d75d5581 Migration fixes for new inference 2018-03-30 20:39:55 +03:00
Mikhail Zarechenskiy ae35a3b324 Enable new inference in the compiler 2018-03-30 20:39:55 +03:00
Mikhail Zarechenskiy 152a9a21f9 Make type parameter nullable as it should be
This change is needed, because in NI we perform a more strict check
2018-03-30 20:39:54 +03:00
Mikhail Zarechenskiy 3592b19fa4 Update bootstrap to 1.2.50-dev-310 2018-03-30 20:39:54 +03:00
Vyacheslav Gerasimov 10c14260b1 Build: Fix dependency on markdown in :prepare:idea-plugin
org.jetbrains:markdown brings kotlin-stdlib dependency transitively, which resolves to default configuration of :kotlin-stdlib project. But we need to pack jar from distJar configuration. Also sourceSets.builtins.output is copied to plugin because :kotlin-stdlib has compile dependency on it. Probably we should also refactor :kotlin-stdlib to avoid such confusions in future.
2018-03-30 20:10:20 +03:00
Vyacheslav Gerasimov 22496353b6 Fix KotlinReferenceImporter, add safe call to quickFixActionRanges
HighlightInfo.quickFixActionRanges is nullable in 181
2018-03-30 17:05:55 +03:00
Ilya Gorbunov d2a235b752 Minor code improvements, add more test cases #KT-11208
Compare new readLine with the reference implementation in BufferedReader.
2018-03-30 16:04:22 +03:00
meztihn 12e427b4b5 KT-11208 Remove readLine's new charset parameter
It can't be introduced in a patch release.
2018-03-30 16:03:19 +03:00
meztihn cca7a59bba KT-11208 Improve readLine's tests readability 2018-03-30 16:03:19 +03:00
meztihn 68cb66ff0e KT-11208 Remove readLine's lineSeparator parameter 2018-03-30 16:03:19 +03:00
meztihn f6c1886394 KT-11208 Remove stream buffering 2018-03-30 16:03:19 +03:00
Ilya Gorbunov f45e3ac7d9 kotlin-stldib-js: do not import experimental sourceset in IDEA
Temporary workaround to prevent multiple IDEA modules sharing the same content root error.
2018-03-30 16:03:19 +03:00
Sergey Mashkov 42de429565 IDL2K: add property to control deployment 2018-03-30 15:13:42 +03:00
Mikhail Zarechenskiy 0632bbbed0 Nullability of intersection type should be determined by supertypes
Intersection types cannot be nullable as is because of special rules for subtyping
2018-03-30 14:51:07 +03:00
Mikhail Zarechenskiy aebcb61402 Resolve elements in chain of qualifier expression without expected type
Consider call chain `foo.bar.baz()` which has expected type `Int`
Elements `foo` and `bar` doesn't have expected type `Int`,
this is especially important in NI, because we use expected type for
candidate applicability
2018-03-30 14:51:07 +03:00
Natalia Selezneva 3d73786e98 Highlight scripts according to ScriptLocation annotation in ScriptDefinition 2018-03-30 14:43:17 +03:00