Mikhail Zarechenskiy
2a93dea0c4
Use concrete candidate to resolve collection literal
...
This helps to avoid resolution errors when there is local array-like function with the same signature as in built-ins
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
222f101d10
Extract collection literal resolve components to separate Kotlin file
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
8466270bdb
Check that arguments of array function call in annotation are constants
...
#KT-16956 Fixed
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
a2ea518b1a
Allow to use collection literals only in annotations
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
bfe2ddf7c1
Introduce language feature for array literals in annotations
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
0f1acab40d
Support collection literals in the JVM backend
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
859bccb9fc
Propagate resolution results without ambiguity to constant evaluator
...
This allows to get rid of useless diagnostics that some value is not a constant
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
e49b2811ec
Apply constant folding for collection literals to use in annotations
...
Currently this is achieved with several hacks:
- Postpone computation of argument type info when there is no candidate resolver. We have to do this, because we don't have expected type and therefore we could write wrong information to trace
- Presume that for annotation calls there is only one candidate resolver and then resolve arguments with expected type (see `getArgumentTypeInfo`), otherwise because of quadratic complexity of the algorithm resolve would be slow
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
c85f6e7d0e
Resolve collection literal expression as special array-like function
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy
d3fd96ceed
Parse collection literals as atomic expressions
2017-03-22 17:59:58 +03:00
Dmitry Jemerov
3c7678092e
Don't mark compiler-created PSI elements as generated
...
This saves some memory on storing the generated flag in the PsiElement
userdata and time required to store the flag.
2017-03-22 13:59:21 +01:00
Alexander Udalov
dc3aa26e3f
Ignore getMembersOfStandardJavaClasses light analysis test
...
See #KT-16616
2017-03-22 14:33:57 +03:00
Alexey Sedunov
56d22277b7
Move: Filter out ConflictUsageInfo instances before running the refactoring
...
#KT-16556 Fixed
2017-03-22 13:36:19 +03:00
Alexey Sedunov
2f136dae1c
Move: KT-8955
...
Fix NPE on moving directory where at least one Kotlin file
contains package directive unmatched by the containing directory
#KT-8955 Fixed
2017-03-22 13:36:18 +03:00
Alexey Sedunov
d1857d68bc
Move: Fix element listener retrieval
...
Get element listener before original declaration is invalidated by the refactoring
2017-03-22 13:36:17 +03:00
Alexey Sedunov
1a8aa6091a
Move: Fix incorrect FqName when moving declaration to default package
...
#KT-15586 Fixed
2017-03-22 13:36:16 +03:00
Alexey Sedunov
1331922963
Move: Fix file rename of move
...
Avoid temporary file rename if the current name doesn't conflict
with other files in the target directory.
Improve protection against exceptions during the refactoring
which may prevent final rename
2017-03-22 13:36:15 +03:00
Alexey Sedunov
92fbca452d
Move: Do not report conflict on usages of inherited protected members
...
#KT-15190 Fixed
2017-03-22 13:36:14 +03:00
Alexey Sedunov
e82b256640
Move: Implement conflict checking for internal members
...
#KT-13190 Fixed
2017-03-22 13:36:13 +03:00
Alexey Sedunov
6f5249ecc7
Move: Fix processing of references to non-real members of companion object
...
#KT-15559 Fixed
2017-03-22 13:36:12 +03:00
Alexey Sedunov
bab762b761
Implement post-refactoring optimization of unused imports
...
#KT-15822 Fixed
#KT-13755 Fixed
2017-03-22 13:36:11 +03:00
Alexey Sedunov
7d185349c8
Move: Fix broken tests
...
Check that constructor call corresponds to class being moved before
transforming outer instance to argument
2017-03-22 13:36:10 +03:00
Alexey Sedunov
13de9aea81
Move: Fix processing of conflicting usages
...
Exclude conflict-associated usages from refactoring.
Move search of file internal usages to MoveKotlinDeclarationsProcessor
2017-03-22 13:36:09 +03:00
Alexey Sedunov
a21f19d613
Move: Use Kotlin declaration mover to handle KtFile
...
IDEA-provided file mover does not process conflicts
#KT-13911 Fixed
2017-03-22 13:36:08 +03:00
Alexey Sedunov
9a3ace423a
Move: Update test data for tests with conflicts
...
Check refactoring result for the case when conflicts are ignored.
Fix move destination when moving to another source root
2017-03-22 13:36:07 +03:00
Alexey Sedunov
38f9e99d91
Kotlin Facet: Fix argument merging
...
#KT-16982 Fixed
2017-03-22 13:36:06 +03:00
Alexey Sedunov
7c7e41592a
Kotlin Facet: KT-16980
...
Avoid reinitialization of module-level settings on each run of
the analyzer in the absence of Kotlin facet
#KT-16980 Fixed
2017-03-22 13:36:05 +03:00
Alexander Udalov
43f1c843ce
Minor, fix typo in docs on built-ins
2017-03-22 13:27:38 +03:00
Dmitry Jemerov
93cb12fed0
Don't keep around an empty value parameters list in FunctionDescriptor
2017-03-22 10:40:19 +01:00
Dmitry Jemerov
3aedf2548c
Don't create empty list for Call arguments
2017-03-22 10:40:19 +01:00
Dmitry Jemerov
51c7fc9f73
Don't use UserDataHolder in SlicedMapImpl, use KeyFMap directly
2017-03-22 10:37:07 +01:00
Dmitry Jemerov
f45511b983
Don't recreate Name instances for special resolve constructs
2017-03-22 10:35:16 +01:00
Matthew Brener
adc19b433e
its --> it's in Char.kt ( #1041 )
2017-03-22 10:29:39 +01:00
Yan Zhulanow
7a5f94129c
Add ClassBuilderMode.KAPT3 tests
2017-03-21 20:49:36 +03:00
Yan Zhulanow
e25e19c4d6
Refactoring: Remove light analysis test data
...
The light analysis test data is not needed anymore cause the light analysis result is now automatically checked against the one from the full analysis.
2017-03-21 20:49:36 +03:00
Yan Zhulanow
c50881fd02
Refactoring: Extract light analysis tests from box tests
2017-03-21 20:49:34 +03:00
Mikhail Glukhikh
23848fa728
Suggest bound references in "Lambda --> Reference" for 1.1+ only
2017-03-21 20:32:15 +03:00
Ilya Chernikov
0f21db1ecb
Copy base script classes to script-runtime before building bootstrap
2017-03-21 16:30:51 +01:00
Ilya Chernikov
08f6b6c93c
minor: get rid of the compiler-test dependency in source-sections test
2017-03-21 16:30:50 +01:00
Ilya Chernikov
1eab936618
minor: Bump rubygrapefruit native-platform version to 0.14
2017-03-21 16:30:49 +01:00
Ilya Chernikov
d439c13fb5
minor: correct measurement error in eval bench test
2017-03-21 16:30:48 +01:00
Ilya Chernikov
4043f491da
minor: replace Pair with data class in daemon client connectAndLease call
...
backport from 1.0.7
2017-03-21 16:30:47 +01:00
Ilya Chernikov
4b430b49a7
Implement source sections compiler plugin
...
allows to compile only parts of the source files, denoted by top-level
"sections" (function with lambda param calls), but preserving original
file line/column numbers for easier diagnostics. Allow e.g. to compile
gradle "buildscript" section without preprocessing original file in
advance. See tests for examples.
2017-03-21 16:30:46 +01:00
Ilya Chernikov
63c276d444
Create extension points and register plugins earlier...
...
to allow plugins to affect source files creation
2017-03-21 16:30:45 +01:00
Alexander Udalov
7dfa3bea18
Update tools & libraries projects to use JDK 8 when needed
2017-03-21 17:45:53 +03:00
Alexander Udalov
33a0ae0fcd
Skip kotlin-maven-plugin integration test if "skipTests" is defined
...
Similarly to kotlin-maven-plugin-test/pom.xml
2017-03-21 17:45:51 +03:00
Alexander Udalov
4273357adf
Skip kotlin-maven-plugin-test tests if "skipTests" property is defined
...
"mvn -DskipTests ..." or "mvn -DskipTests=true ..." should not invoke
any tests
2017-03-21 17:45:51 +03:00
Sergey Igushkin
132393cc64
Fix for androidTest Gradle build
...
Replaced adding Kotlin sources with dependency on copy*KotlinClasses,
which might not be called since Android Gradle plugin sometimes
bypasses the tasks in finalizedBy .
Added a test for androidTest build apart from general build.
Issues: #KT-16897 Fixed
2017-03-21 17:30:59 +03:00
Dmitry Jemerov
ba9213234c
Increase -Xmx for running Ant from AntTaskTestGenerated
...
The current value is no longer sufficient when running under JDK 8.
2017-03-21 15:19:55 +01:00
Sergey Igushkin
498c4dddea
Fix for compatibility with Android Gradle plugin 2.4.0-alpha1
...
Deferred resolution of JAR-to-AAR mapping, since the Android Gradle
plugin now resolves dependencies at execution phase.
Dropped the code related to the Jack toolchain compatibility.
Throwing a build error when Jack is enabled.
Changed warning about Jack into a build error.
2017-03-21 16:56:09 +03:00