Commit Graph

41924 Commits

Author SHA1 Message Date
Mikhael Bogdanov bd9ac65eaf Update stdlib jre8 test jvm-target 2017-10-09 16:38:56 +02:00
Mikhael Bogdanov 3c81430bb9 Update cli module jvm-target
#KT-20671 Fixed
2017-10-09 16:38:56 +02:00
Kirill Rakhman 91c35a6c59 Support listOfNotNull in SimplifiableCallChainInspection #KT-20410 Fixed 2017-10-09 16:38:52 +03:00
Dmitry Petrov 82a9c35194 Fix self-reference to singleton in initializer
Singleton instance is "initialized" by delegating constructor call,
which is superclass constructor call in case of singletons (because
singletons can't have more than one constructor).

Singleton constructor is effectively split into two stages:
- before a super constructor call;
- after a super constructor call.

Before super constructor call, singleton instance can't be used directly
(see KT-20662), because neither 'this' nor static instance is
initialized yet. However, it can be used in closures, in which case a
static instance should be used (escaping uninitialized this is
prohibited by JVM). Actually using this static instance before it is
initialized (e.g., invoking a method that uses this singleton) will
cause a correct ExceptionInInitializerError.

After a super constructor call, static instance of a singleton may be
not initialized yet (in case of enum entries and interface companion
objects). However, we already have an initialized 'this', which we
should use for singleton references.

 #KT-20651 Fixed
2017-10-09 16:27:34 +03:00
Vyacheslav Gerasimov 62d0e4a51a Add name for GradleProjectImportProvider
#KT-20648 Fixed
2017-10-09 14:40:35 +03:00
Alexander Udalov 6d9e8c9414 Add Gradle tasks to generate protobuf, update readme 2017-10-09 12:35:46 +02:00
Alexander Udalov 450bfca41f Move dependency generators->protobufFull up in the list
Otherwise protobufLite (required by compiler modules) wins, and
GenerateProtoBufCompare cannot be run
2017-10-09 12:35:42 +02:00
Alexander Udalov 2699868586 Add "-Duser.country=US" to gradle.properties
To make Gradle daemon which is run from IntelliJ IDEA use the same
environment as the daemon run by the "gradlew" command (the latter is
always using US)
2017-10-09 12:34:02 +02:00
Dmitry Petrov a4918748a5 Specialize not-null values using information from current analysis pass
Instead of a separate analysis pass to determine variable types at the
point of null checks, use current data flow information and transform
possibly nullable values to definitely non-null values using a special
intrinsic.

This allows to perform a single data flow analysis pass per RNCE
transformation pass (instead of two passes).
2017-10-09 12:20:40 +03:00
Dmitry Petrov d31efaa7ac Don't analyze method in RNCE if there're no optimizable instructions 2017-10-09 12:20:40 +03:00
Toshiaki Kameyama 0bda2732e5 Fix for KT-19134 IntelliJ Color Scheme editor - allow changing color of colons and double colons (#1314) 2017-10-09 11:02:02 +02:00
Nicolay Mitropolsky d609579e55 FakeFileForLightClass tries to use ktFile.originalFile.virtualFile 2017-10-06 23:53:33 +03:00
Dmitry Jemerov 703d053157 Additional fixes for consistent parent conversion 2017-10-06 20:51:04 +02:00
Dmitry Jemerov bde7a657cf Adapt to new equality rules due to lazy parent calculation 2017-10-06 20:51:04 +02:00
Dmitry Jemerov ada695bd17 Fix loop in parent structure on 'when' condition with expression 2017-10-06 20:51:03 +02:00
Dmitry Jemerov 31fb34d9af Fix and add some required type checks 2017-10-06 20:51:03 +02:00
Vyacheslav Gerasimov b12f24b41c Fix KtLightClass conversion and testParameterPropertyWithAnnotation 2017-10-06 20:51:03 +02:00
Dmitry Jemerov fe021afa37 Temp disable UAST caching 2017-10-06 20:51:03 +02:00
Dmitry Jemerov bab2641bed Don't test parent structure consistency in irrelevant cases 2017-10-06 20:51:03 +02:00
Dmitry Jemerov 61f6db87c4 Use convertOpt() for getting inner classes of script 2017-10-06 20:51:02 +02:00
Dmitry Jemerov a4f5a1335a Fix convering parents of annotations on primary constructor parameters 2017-10-06 20:51:02 +02:00
Dmitry Jemerov 56168b4a09 Fix destructuring declaration test 2017-10-06 20:51:02 +02:00
Dmitry Jemerov a7efc4f5da Return correct parent for parts of converted elvis expression 2017-10-06 20:51:02 +02:00
Dmitry Jemerov e55f4c6e78 Return correct parent element for destructuring declaration initializer 2017-10-06 20:51:02 +02:00
Dmitry Jemerov a44dff6803 Take into account annotation use site target when converting parent 2017-10-06 20:51:01 +02:00
Dmitry Jemerov d976c1d594 Correctly convert KtProperty with no backing field to UAST 2017-10-06 20:51:01 +02:00
Dmitry Jemerov e63838703a Consistently convert local functions to UAST 2017-10-06 20:51:01 +02:00
Dmitry Jemerov 942fe11020 Correctly convert KtParameter to UAST 2017-10-06 20:51:01 +02:00
Dmitry Jemerov adf1df3eb0 Return correct parent for elements under when expression body 2017-10-06 20:51:01 +02:00
Dmitry Jemerov c98c3a7033 Work in progress on consistent UAST structure 2017-10-06 20:51:00 +02:00
Dmitry Jemerov a5a5b37e1e Don't duplicate UAST parent calculation logic 2017-10-06 20:51:00 +02:00
Dmitry Jemerov b638febc41 Fix conversion of destructuring declarations 2017-10-06 20:51:00 +02:00
Dmitry Jemerov 40daeb13d1 Evaluate parents of UAST elements lazily
Also add tests for UAST consistency in various cases
2017-10-06 20:51:00 +02:00
Dmitry Jemerov 91459bbd6a Enable caching of converted UElements for Kotlin 2017-10-06 20:50:59 +02:00
Ilya Chernikov cff6d8cf17 Refactor context classpath discovery, share it to idea's jsr223 host...
...from script-util
fix daemon usage in repls
define compiler classpath for script-util tests explicitly
minor refactorings in the build scripts for better import into idea
2017-10-06 20:12:51 +02:00
xiexed 12e35ccf96 KotlinUastBindingContextProviderService moved to plugin.xml (#1303) 2017-10-06 19:17:25 +02:00
Raluca Sauciuc 768710676b AndroidExtensionsReferenceSearchExecutor should also require a read action (#1327)
... just like AndroidReferenceSearchExecutor does. Otherwise, we get
com.intellij.openapi.application.impl.ApplicationImpl$NoReadAccessException
     [java]    [uitest]         at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1070)
     [java]    [uitest]         at com.intellij.psi.impl.source.tree.CompositeElement.textToCharArray(CompositeElement.java:291)
     [java]    [uitest]         at com.intellij.psi.impl.source.tree.CompositeElement.getText(CompositeElement.java:261)
     [java]    [uitest]         at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.getValue(XmlAttributeValueImpl.java:72)
     [java]    [uitest]         at org.jetbrains.android.dom.wrappers.ValueResourceElementWrapper.getValue(ValueResourceElementWrapper.java:458)
     [java]    [uitest]         at org.jetbrains.kotlin.AndroidExtensionsReferenceSearchExecutor.processQuery(AndroidExtensionsReferenceSearchExecutor.kt:42)
     [java]    [uitest]         at org.jetbrains.kotlin.AndroidExtensionsReferenceSearchExecutor.processQuery(AndroidExtensionsReferenceSearchExecutor.kt:38)
     [java]    [uitest]         at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:87)
     [java]    [uitest]         at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:45)
     [java]    [uitest]         at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:79)
     [java]    [uitest]         at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
     [java]    [uitest]         at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
     [java]    [uitest]         at com.intellij.psi.search.QuerySearchRequest.runQuery(QuerySearchRequest.java:53)
     [java]    [uitest]         at com.intellij.psi.impl.search.PsiSearchHelperImpl.appendCollectorsFromQueryRequests(PsiSearchHelperImpl.java:635)
     [java]    [uitest]         at com.intellij.psi.impl.search.PsiSearchHelperImpl.processRequests(PsiSearchHelperImpl.java:596)
     [java]    [uitest]         at com.intellij.psi.search.SearchRequestQuery.processResults(SearchRequestQuery.java:45)
     [java]    [uitest]         at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:79)
     [java]    [uitest]         at com.intellij.util.MergeQuery.processSubQuery(MergeQuery.java:85)
     [java]    [uitest]         at com.intellij.util.MergeQuery.forEach(MergeQuery.java:57)
     [java]    [uitest]         at com.intellij.util.MergeQuery.findFirst(MergeQuery.java:51)
     [java]    [uitest]         at com.intellij.util.UniqueResultsQuery.findFirst(UniqueResultsQuery.java:51)
     [java]    [uitest]         at com.android.tools.idea.editors.theme.ThemeEditorComponent$19.doInBackground(ThemeEditorComponent.java:895)
     [java]    [uitest]         at com.android.tools.idea.editors.theme.ThemeEditorComponent$19.doInBackground(ThemeEditorComponent.java:891)
     [java]    [uitest]         at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
     [java]    [uitest]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
     [java]    [uitest]         at javax.swing.SwingWorker.run(SwingWorker.java:334)
     [java]    [uitest]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     [java]    [uitest]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     [java]    [uitest]         at java.lang.Thread.run(Thread.java:745)
     [java]    [uitest] [  72230]  ERROR - plication.impl.ApplicationImpl - Android Studio 3.1 Canary  Build #171.SNAPSHOT
2017-10-06 19:11:59 +02:00
Ilya Gorbunov 8b70767d76 Configure pom signing before deployment
Use groovy where kotlin dsl lacks of typed api
2017-10-06 19:50:22 +03:00
Alexey Andreev eaa8729259 Fix embedding sources to source maps when compiling JS stdlib 2017-10-06 18:26:15 +03:00
Alexey Andreev 3b3fd0fa0d JS: fix DCE limits in test data to fit new kotlin.js size
The size has increased due to new implementation of KClass
2017-10-06 18:16:51 +03:00
Anton Bannykh 997aecfcab JS: default to enabled TypedArrays translation when configuration key is not present 2017-10-06 17:14:23 +03:00
Mikhail Glukhikh e1ccd3afc5 Inspection: do not report anything with manual INFORMATION level offline
So #KT-20369 Fixed
So #KT-20333 Fixed
2017-10-06 16:21:04 +03:00
Toshiaki Kameyama ec64a7e422 Insert brackets in "Convert reference to lambda" if necessary
So #KT-16394 Fixed
2017-10-06 16:20:45 +03:00
Leonid Stashevsky 0348561cd2 Add annotation for default parameter value 2017-10-06 15:45:38 +03:00
e5l 62e87c873c Add annotation for parameter name in signatures 2017-10-06 15:45:37 +03:00
Dmitry Jemerov 8201ff3006 Fix properties plugin dependency for AS 2.3 2017-10-06 14:43:22 +02:00
Dmitry Jemerov d79b9c1b51 Allow plugin dependencies to be optional (no Maven in Android Studio) 2017-10-06 14:43:22 +02:00
Dmitry Jemerov 85254838f6 Allow building UAST for in-memory virtual files 2017-10-06 14:43:22 +02:00
Leonid Stashevsky a54c71eb30 Escape separator in jsr305 CLI tests 2017-10-06 15:34:33 +03:00
Alexey Andreev 9008791a54 JS: generate paths in source maps relative to .map file location
See KT-19818
2017-10-06 15:24:25 +03:00