Commit Graph

38785 Commits

Author SHA1 Message Date
Mikhael Bogdanov 4e0bacab1e Add '/' to 'bin/java' path 2017-05-03 17:48:43 +02:00
Nikolay Krasko d094854878 Better indentation for expressions without parsed errors (KT-12123)
#KT-12123 Fixed
2017-05-03 18:03:40 +03:00
Nikolay Krasko c0b545085a Search statics java declarations through star imports 2017-05-03 18:03:39 +03:00
Nikolay Krasko 2d51d72708 Use classes to increase search pattern for static declarations
Static common names like 'INSTANCE', 'create' can give many irrelevant
references in the project.

#KT-17000 Fixed
#KT-14974 Fixed
2017-05-03 18:03:39 +03:00
Nikolay Krasko 7ee58be515 Don't fall back to full search because of reference in fqname 2017-05-03 18:03:39 +03:00
Nikolay Krasko 5cbc653f00 Avoid 'invoke' reference resolve because of references on the same range
When 'text' usages are being search, invoke reference in 'some(text)'
is considered relevant.
2017-05-03 18:03:39 +03:00
Nikolay Krasko 43d8a70ad3 Remove property accessor references from packages, imports and types 2017-05-03 18:03:39 +03:00
Nikolay Krasko ba2f43ab78 Add caching for reference resolution in idea ResolveCache 2017-05-03 18:03:39 +03:00
Ilya Gorbunov 9953efc66b Clarify ReentrantReadWriteLock.write behavior regarding upgrade from read to write lock
#KT-17704 Fixed
2017-05-03 17:51:14 +03:00
Ilya Gorbunov ef72371fd7 Add samples for contentToString and contentDeepToString array operations 2017-05-03 17:44:30 +03:00
Marek Langiewicz 934b0b8c38 Fix List.takeLast for lists without RandomAccess 2017-05-03 16:38:15 +02:00
Ilya Gorbunov 8da4839f22 Document IllegalArgumentException thrown from string-number conversion
functions when an invalid radix is specified
#KT-17635 Fixed
2017-05-03 17:32:49 +03:00
Alexey Andreev cffdd3fd26 Add changelog for 1.1.3 2017-05-03 17:26:21 +03:00
Mikhael Bogdanov 84eeed51b1 Restore accidentally removed parameter index passing to call generator
Parameter index was removed in
 7690a8bc3e commit:
 "Get rid of redundant 'afterParameterPut' method from call generators"

  #KT-17653 Fixed
2017-05-03 12:56:15 +02:00
Igor Chevdar 962bce19a2 Enabled tests on coroutines for native 2017-05-03 10:42:07 +03:00
Dmitry Jemerov 7812a17f13 Mark Kotlin plugin as a JPS plugin so that JPS extensions are loaded
The Kotlin output parser for the Gradle build output in Android Studio
is loaded through the JPS extension manager, and the Kotlin JPS
plugin doesn't exist in Android Studio, so we need to use this
mechanism.

 #KT-17596 Fixed
2017-05-02 21:26:45 +02:00
Svetlana Isakova 191e0802e9 Added description for 'Name resolution and SAM conversion' 2017-05-02 21:14:48 +03:00
Mikhail Glukhikh b5d0de7c3f Add test for KT-17479 looks like #KT-17479 Fixed
(after CAPTURED_MEMBER_VAL_INITIALIZATION introduction)
2017-05-02 19:59:43 +03:00
Mikhail Glukhikh 28283bad3e Introduce special CAPTURED_VAL_INITIALIZATION for members 2017-05-02 19:59:37 +03:00
Mikhail Glukhikh 56e633e345 CFA: detect captured writes more precisely
So #KT-14381 Fixed
So #KT-13597 Fixed
Also refactors captured writes detection inside DFA
2017-05-02 19:59:23 +03:00
Mikhail Glukhikh 8fa739ed0f Test for KT-14381 and KT-13597 2017-05-02 19:02:01 +03:00
Mikhail Glukhikh fbc1d1a844 Clear var nullability in loops more accurately #KT-14977 Fixed 2017-05-02 19:01:48 +03:00
Mikhail Glukhikh dc3ea4b6e4 Remove <Unknown Name> from module name rendering
Fixes failing multi-platform tests
2017-05-02 19:01:43 +03:00
Mikhail Glukhikh 1efa45f79e Minor: deprecation fix 2017-05-02 19:01:37 +03:00
Mikhail Glukhikh 0798e43524 Consider only source-compatible modules in allImplementingModules use-sites
So #KT-17400 Fixed
So #KT-15680 Fixed
So #KT-15660 Fixed
Likely also #KT-16838 Fixed
2017-05-02 19:01:31 +03:00
Pavel V. Talanov 956ace3463 Light classes: modifierList#findAnnotation does not trigger exact resolve 2017-05-02 15:40:22 +03:00
Pavel V. Talanov 57baaf2a50 Test no exact delegates were constructed during annotated element search
Add test case for aliased import
2017-05-02 15:40:21 +03:00
Pavel V. Talanov ac92cf8bea Refactor: AnnotatedMembersSearchTest is now generated and J2K'ed 2017-05-02 15:40:21 +03:00
Pavel V. Talanov 55a0e138fc Refactor: extract AnnotationDescriptor.annotationClass utility 2017-05-02 15:40:20 +03:00
Pavel V. Talanov 7ef18fe5ba Tests: add some test cases for inheritor search
Refactor inheritor search tests to be generated
2017-05-02 15:40:19 +03:00
Pavel V. Talanov 178e59a6e8 LazyLightClassDataHolder: move internal members check to IDELightClassContexts#isDummyResolveApplicable 2017-05-02 15:40:18 +03:00
Pavel V. Talanov 0571c62943 KtLightElements: make light annotations lazier
Allow to get annotation list and to invoke `findAnnotation` without building delegate
Introduce KtLightNullabilityAnnotation which holds nullability information and is built
    before delegate is built
2017-05-02 15:40:17 +03:00
Pavel V. Talanov 03b68666e4 KtLightClassForSourceDeclaration: use psi based resolve to speedup isInheritor checks 2017-05-02 15:40:17 +03:00
Pavel V. Talanov bdc4014ded Refactor: Introduce KtLightElementBase 2017-05-02 15:40:16 +03:00
Pavel V. Talanov 5346efae6e Minor: toString() in IDELightClassConstructionContext 2017-05-02 15:40:15 +03:00
Pavel V. Talanov 901aa9c18b PsiBasedClassResolver: use ImpreciseResolveResult instead of Boolean? 2017-05-02 15:40:14 +03:00
Pavel V. Talanov 8f4c969933 KtLightElement is no longer PsiNamedElement 2017-05-02 15:40:14 +03:00
Mikhail Glukhikh 04f7ba95c5 Add module name to HEADER_WITHOUT_IMPLEMENTATION message 2017-05-02 14:17:20 +03:00
Dmitry Petrov 6cefc0ddf3 Infer suspend flag for local delegated property accessors
Local delegated property accessors calling suspend operators getValue
or setValue should be suspend functions themselves.

KT-17605 Getter and setter of suspend delegated property are not suspend
2017-05-02 12:52:36 +03:00
Alexander Udalov 0624854d5a Fix compilation of kotlin-gradle-plugin
The "ClassReader(InputStream)" constructor is stripped from
kotlin-compiler by proguard, so use the "ClassReader(ByteArray)"
constructor instead
2017-04-29 18:43:58 +03:00
Alexander Udalov e79fdbe5e8 Gradle: print version loaded from environment's compiler jar
And not from the KotlinCompilerVersion class that is accessible in the
current version of kotlin-gradle-plugin, because the version of the
compiler might be different
2017-04-28 20:56:14 +03:00
Alexander Udalov fcf44af294 Change how kotlinc and tools display their version
- Display the Kotlin version in kotlin-gradle-plugin. This is needed
  because if "-version" is specified in compiler arguments, the "info"
  level of the message printed by the compiler in CLICompiler prevents
  it from being displayed by default (unless "--debug" is passed to
  Gradle).
- Display the version of JRE the compiler is running on. This will be
  helpful to diagnose Java 9 related issues in the future.
- In CLI, also display the executable name (kotlinc-jvm or kotlinc-js)
2017-04-28 20:49:54 +03:00
Alexander Udalov bb01ca038a Improve messages printed by JPS plugin in Messages view
- Don't print "Loaded plugin: KotlinAndroidJpsPlugin" and "Using
  kotlin-home = ..." for every build. They are rarely useful; they can
  be found in the build log now
- Instead of potentially confusing for the user "Kotlin JPS plugin
  version ..." output simply "Kotlin version ...". Also add the version
  of the JRE, where the compiler is being run
- Do not treat messages reported with severity LOGGING as BuildMessage
  with kind PROGRESS. Such build messages are displayed to the user in
  the progress/status bar when IDEA Make process is running, but LOGGING
  messages never had this meaning. In particular, users could be
  confused by the progress bar message "Kotlin: Configuring the
  compilation environment" visible for a very long time during
  compilation. This message just happens to be the last LOGGING message
  reported by the compiler before the actual compilation; its presence
  there created an illusion that Kotlin spends most of the time
  configuring the compilation environment

 #KT-17387 Fixed
2017-04-28 20:49:29 +03:00
Alexander Udalov d8d3bafbe9 Introduce "-Xreport-output-files" to report source-output mapping for JPS
This makes "-verbose" not required for JPS to run correctly and
therefore allows to print more useful debugging stuff in the compiler
and read them in CLI, for example. The output will also be more readable
because there'll be no "output" messages
2017-04-28 20:49:28 +03:00
Yan Zhulanow ce145c015d Android Extensions: rename plugin JAR file names in plugin artifact
Rename compiler plugin to 'android-extensions-compiler' in order to have the same name in dist and IDEA plugin.
Rename IDEA plugin to 'android-extensions-ide' to make things clear.
2017-04-28 19:43:36 +03:00
Mikhail Glukhikh d0da11321d Fix of SpringInspectionTestGenerated 2017-04-28 18:22:21 +03:00
Alexander Udalov 5bd3716637 Fix compilation of kotlin-maven-plugin and kotlin-script-util 2017-04-28 16:31:11 +03:00
Zalim Bashorov 87db245dd8 KJS: fix JS backend tests on windows 2017-04-28 16:17:02 +03:00
Vyacheslav Gerasimov e841fceea0 Update changelog for 1.1.2-2 2017-04-28 16:12:39 +03:00
Simon Ogorodnik 9a969b0449 Add basic completion for operator fun names
#KT-11250 fixed
2017-04-28 15:06:27 +03:00