Commit Graph

38752 Commits

Author SHA1 Message Date
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
Mikhail Glukhikh 0e7753df3a Added tests forgotten by alexey andreev 2017-04-28 13:37:24 +03:00
Mikhael Bogdanov a7c9e14805 Don't generate default arguments for inline call 2017-04-28 12:19:09 +02:00
Mikhael Bogdanov 7690a8bc3e Get rid of redundant 'afterParameterPut' method from call generators 2017-04-28 12:19:09 +02:00
Mikhael Bogdanov b440561f5c Generate default arguments and varargs lazily
The aim to perform optimizations in call generators
2017-04-28 12:19:08 +02:00
Mikhael Bogdanov 02cc5f6bc1 Expand default parameters conditions on inlining default function
#KT-14564 Fixed
 #KT-10848 Fixed
 #KT-12497 Fixed
2017-04-28 12:19:07 +02:00
Dmitry Jemerov d49e9d7064 Fix override navigation from properties defined in primary constructor
EA-91185 - CCE: KotlinLineMarkerProviderKt$OVERRIDDEN_PROPERTY$.browse
2017-04-28 12:02:20 +02:00
Dmitry Jemerov c22e0d88f0 More generic solution for testing line marker navigation 2017-04-28 12:02:19 +02:00
Dmitry Jemerov f9bca06e33 AbstractLineMarkersTest: J2K 2017-04-28 12:02:19 +02:00
Dmitry Jemerov 18a065865b AbstractLineMarkersTest: rename to .kt 2017-04-28 12:02:19 +02:00
Dmitry Jemerov d46f222a12 Don't try to store "is Kotlin" state for non-local jars (EA-80264) 2017-04-28 12:02:19 +02:00
Dmitry Jemerov 184ff9542c Add missing case to DECLARATION_NAME_WITH_KIND renderer (EA-100667) 2017-04-28 12:02:19 +02:00
Mikhail Glukhikh b58c512f7b Fix broken parameter info test: add WITH_RUNTIME 2017-04-28 11:32:30 +03:00
Mikhail Glukhikh 9fca7e814f Test refactoring: extract common parts from inspection tests 2017-04-28 10:56:08 +03:00
shiraji 6f94f45409 Disable "Make constructor internal" for annotations #KT-17599 Fixed 2017-04-28 10:55:13 +03:00
shiraji d542aef7e4 Disable "Make constructor private" for annotations #KT-17600 Fixed 2017-04-28 10:54:54 +03:00
Alexey Andreev c8c3d24b45 Fix non-suspending labeled loop in suspend function
Fix bug when labeled loop, which does not contain suspend calls
in its body, was losing its label
2017-04-28 10:52:14 +03:00
Alexey Andreev 6047746c90 Fix optimization in JS BE
Don't apply while condition folding when corresponding break
statement breaks outer loop.
2017-04-28 10:52:13 +03:00
Alexey Andreev d89ce80d97 Fix temporary variable elimination in JS BE
Don't eliminate temporary variable when between its usage and its
definition there's assignment to a non-local variable.

Fix KT-17540
2017-04-28 10:51:30 +03:00
Ilya Gorbunov 8d0eb207e3 Do not hardcode kotlin version in one of maven integration tests 2017-04-27 23:35:18 +03:00
Ilya Gorbunov 71636aec41 Share run configuration to regenerate sources, share vcs and issue tracker settings 2017-04-27 23:34:58 +03:00
Ilya Gorbunov a50c2ff0a5 Upgrade kotlin gradle plugin used to build libraries to 1.1.2 2017-04-27 21:59:46 +03:00
Mikhail Glukhikh 19021ec1aa VarianceChecker refactoring: move checkClassOrObject to IDE 2017-04-27 20:58:40 +03:00
Mikhail Glukhikh b66401a41d Variance checker: add check for nested local / anonymous classes
So #KT-16136 Fixed
2017-04-27 20:58:39 +03:00
Dmitry Neverov 9dd217eee3 Introduce intention to name anonymous parameter #KT-17191 Fixed 2017-04-27 20:58:38 +03:00
Mikhail Glukhikh bc071bf543 Add parameter info test for #KT-14484 Obsolete 2017-04-27 20:58:36 +03:00
Alexander Udalov c92aa1a62d Fix test data in incompleteHierarchyInJava test
This likely started to behave differently since d65af8f9
2017-04-27 20:52:33 +03:00
Alexander Udalov 82e6324c45 Support compilation against modular JDK (9+)
For more information about the "jrt" file system, see
http://openjdk.java.net/jeps/220 and
https://bugs.openjdk.java.net/browse/JDK-8066492.

This commit fixes DiagnosticsWithJdk9TestGenerated.testKt11167

 #KT-11167 Fixed
2017-04-27 20:48:24 +03:00
Alexander Udalov a519ab681a Add diagnostic tests against Java 9
These tests currently won't run if you don't have environment variable
JDK_9 set up
2017-04-27 20:35:14 +03:00
Alexander Udalov 7f5d87ea17 Rename PathUtil.getJdkClassesRoots to avoid confusion
Two of these methods return roots given a path to the JRE, and the third
one returns roots given a path to the _JDK_.
2017-04-27 20:35:14 +03:00
Alexander Udalov 15efbcae02 Use Class->KClass cache in Class.kotlin extension
#KT-17594 Fixed
2017-04-27 20:34:45 +03:00
Mikhail Zarechenskiy fcf70fda22 Fix exception when classes erroneously have no name
#KT-16775 Fixed

 Exception appears because of different representation of classes without name. For Kotlin we load them with `SpecialNames.NO_NAME_PROVIDED`, but for Java (for light classes) with `SpecialNames.safeIdentifier`
2017-04-27 18:57:45 +03:00
Yan Zhulanow 4b072d59ac Minor: Fix test for Android illegal identifiers 2017-04-27 18:52:13 +03:00
Yan Zhulanow 14fde339ef Minor: Fix Android JPS test 2017-04-27 18:52:12 +03:00