Mikhael Bogdanov
7b212c5650
Add support for android MPP
...
#KT-18462 Fixed
2018-01-18 15:21:19 +01:00
Toshiaki Kameyama
2a10d8e837
KT-15176 Remove "Create type alias" intention when called on java class
2018-01-18 16:23:40 +03:00
Dmitry Savvinov
44920f42d8
[NI] Fix unit coercion
...
Consider following case:
fun foo(): Unit = run { "hello" }
Previously, NI would analyze lambda body without expected type, because
it is a type variable 'R' from 'run', which hasn't been fixed yet. This
leads to treating "hello" as lambda-return argument and adding bogus
'String' constraint on 'R', and, consequently, type mismatch.
Now, we peek into current constraint system and check if return-type of
lambda is type variable with upper-Unit constraint (which is exactly
condition for its body to be Unit-coerced). If so, then we provide
expected Unit-type for body explicitly, and the rest will be done
automatically (in particular, in aforementioned example "hello" wouldn't
be treated as lambda return argument).
2018-01-18 15:13:45 +03:00
Alexander Udalov
b3eeb2f735
Remove unneeded members of ConstantValueFactory
2018-01-18 12:49:38 +01:00
Alexander Udalov
82574cb570
Do not store ClassDescriptor in EnumValue
...
Only store the ClassId of the enum class and the Name of the entry, and
resolve the needed descriptor in getType() instead, which now takes the
module instance where that descriptor should be resolved
2018-01-18 12:49:38 +01:00
Alexander Udalov
9290d58ed0
Improve "firstArgumentValue" and "argumentValue" extension functions
...
Using the argument value, which is of type "Any?", is more implicit and
thus difficult to read than using the ConstantValue instance and casting
it to the needed constant value implementation before taking the value
2018-01-18 12:49:38 +01:00
Alexander Udalov
899002b681
Refactor JavaEnumValueAnnotationArgument and implementations
...
Only require implementations to be able to compute the enum class name
and the corresponding entry name. Only this should be necessary to
correctly resolve the argument; the resolvers will find the
corresponding class descriptor if necessary
2018-01-18 12:49:38 +01:00
Alexander Udalov
907f53e539
Refactor ConstantValue implementations
...
Remove KotlinBuiltIns and take a ModuleDescriptor instance in getType
instead. This will allow to create constant values in contexts where
there's no module or built-ins accessible (such as, deserialization of
module annotations during indexing of .kotlin_module files in IDE).
Note that some values (KClassValue, EnumValue, AnnotationValue) still
take module-dependent objects (KotlinType, ClassDescriptor and
AnnotationDescriptor respectively). This is to be refactored later
2018-01-18 12:49:38 +01:00
Alexander Udalov
5e97517c8b
Fix bug in StringValue.equals
...
Also simplify equals() implementations of other constant values
2018-01-18 12:49:38 +01:00
Alexander Udalov
95f9884799
Move META-INF/extensions/compiler.xml to module 'cli'
2018-01-18 12:48:04 +01:00
Alexander Udalov
02857dbfdb
JS: support "LANGUAGE" directives in box tests
2018-01-18 12:46:27 +01:00
Alexander Udalov
8b3d439d5b
JS: minor, simplify code locating default argument values
...
At the only call site of getDefaultArgument it is checked that the
parameter actually _declares_ default value, so it's not necessary to
try to load that value from supertypes
2018-01-18 12:46:27 +01:00
Nikolay Krasko
ae2d67a5b1
Update "Kotlin configured but no stdlib" status on file update (KT-22356)
...
Provide feedback before project re-import is finished.
#KT-22356 Fixed
2018-01-18 12:13:54 +03:00
Nikolay Krasko
2637a36e22
Inspection doesn't suggest Maven Plugin for kotlin-stdlib-jre8 (KT-18007)
...
#KT-18007 Fixed
2018-01-18 12:13:53 +03:00
Nikolay Krasko
4a2440ea0f
Reformat and cleanup idea-maven_main module
2018-01-18 12:13:53 +03:00
Mikhael Bogdanov
7f1cc81d39
Support test directives in android tests
2018-01-18 10:08:58 +01:00
Mikhael Bogdanov
ef1a3ec32d
Convert CodegenTestsOnAndroidGenerator to Kotlin
2018-01-18 10:08:58 +01:00
Mikhael Bogdanov
7e6542b8c8
Renema CodegenTestsOnAndroidGenerator.java to CodegenTestsOnAndroidGenerator.kt
2018-01-18 10:08:57 +01:00
Denis Zharkov
1716720604
Optimize declaration providers for case of non-existing packages
...
Avoid creating memoized function nodes when the value is obviously null
Otherwise, it may lead to about 25M retained by empty concurrent hashmap
nodes
2018-01-18 11:40:26 +03:00
Denis Zharkov
0f74bb4a7a
Get rid of compile dependency to 'compiler-embeddable' from :idea
...
Previously, it's been added transitively from :kotlin-compiler-runner
as a compile dependency instead of runtime as it's declared in compiler-runner
2018-01-18 11:39:34 +03:00
Alexey Tsvetkov
72f2406083
Turn IC on by default for MPP projects
2018-01-17 21:23:43 +03:00
Sergey Igushkin
5deb20543f
Get rid of gradle-api artifacts uploaded to and used from JB repo
...
Remove redundant Maven dependency to `gradle-api` scoped as provided
2018-01-17 18:45:26 +03:00
Vyacheslav Gerasimov
d16883deaa
Build: Clean previous output before instrumentation
...
Otherwise it may lead to unnecessary classes (left from previous plugin build) being packed to plugin
2018-01-17 16:57:56 +03:00
Dmitry Savvinov
c704f2de9a
Reformat 'resolution' module according to new codestyle
2018-01-17 16:47:45 +03:00
Vyacheslav Gerasimov
e2b83aecd7
Fix publishing to Gradle plugin portal
2018-01-17 15:33:15 +03:00
Anton Bannykh
7b0070ea62
Promise-based async integration test for kotlin-test-js
2018-01-17 14:46:13 +03:00
Dmitry Jemerov
ca57309374
Temp revert fix for KT-10591 as it causes non-obvious test breakage
2018-01-17 11:39:35 +01:00
Alexey Sedunov
a752f3f38e
Misc: Rename class
2018-01-17 12:54:39 +03:00
Alexey Sedunov
62580a47dc
Misc: Add test for KT-7316
...
#KT-7316 Fixed
2018-01-17 12:53:57 +03:00
Alexey Sedunov
54f4f5ff24
Configuration: Add Kotlin SDK for non-JVM projects
...
#KT-16976 Fixed
2018-01-17 12:52:51 +03:00
Alexey Sedunov
af1d6124ce
JS: Do not specify NodeJS path in Gradle projects
...
We rely on node_modules directory content which must be populated
by the build script itself
2018-01-17 12:45:45 +03:00
Alexey Sedunov
c6a9c36275
Analyze Data Flow: Support cross-language analysis
...
#KT-16833 Fixed
2018-01-17 12:40:34 +03:00
Dmitry Petrov
6cb68531ae
Minor: add missing "'"
2018-01-17 12:31:07 +03:00
Dmitry Petrov
bba8168150
Add test for extension properties declaration in IR
2018-01-17 12:31:07 +03:00
Dmitry Petrov
1f841e35bc
Formatting: psi2ir
2018-01-17 12:31:07 +03:00
Dmitry Petrov
432c743771
Formatting: ir.tree and some common code
2018-01-17 12:31:07 +03:00
Dmitry Petrov
fdd000c94f
Update testData to new format
2018-01-17 12:31:07 +03:00
Dmitry Petrov
4d54036d21
Use declaration properties in RenderIrElementVisitor
2018-01-17 12:31:07 +03:00
Dmitry Petrov
7dc15b15bb
Add basic properties to IR declarations
2018-01-17 12:31:07 +03:00
Dmitry Petrov
2f09c51dca
Formatting: IR test classes
2018-01-17 12:31:07 +03:00
Nikolay Krasko
704ce121bc
Use other property name in Java with Kotlin static import tests
2018-01-17 12:05:06 +03:00
Nikolay Krasko
1c7e42f1d4
Collapsed comments containing * get removed in the summary line (KT-21994)
...
#KT-21994 Fixed
2018-01-17 12:05:05 +03:00
Nikolay Krasko
a1b20535b2
Search same place for it usages in rainbow highlighter (KT-22242)
...
Reuse KotlinTargetElementEvaluator for getting same declaration
context for implicit 'it' parameter.
#KT-22242 Fixed
2018-01-17 12:05:04 +03:00
Vyacheslav Gerasimov
f86b77083f
Add sources and javadoc to kotlin-annotations-android
2018-01-16 21:19:46 +03:00
Alexey Tsvetkov
d1d786dffa
Fix lookup tracking in JPS with enabled daemon
...
#KT-21962 fixed
2018-01-16 21:09:57 +03:00
Alexey Tsvetkov
220fab0d3f
Test JPS with Daemon and IC
2018-01-16 21:09:57 +03:00
Alexey Tsvetkov
ca09be1411
Minor: move 'KotlinJpsBuildTestIncremental' to separate file
2018-01-16 21:09:57 +03:00
Nicolay Mitropolsky
b4db744a9b
Uast: KotlinStringULiteralExpression.getExpressionType() made always return String
2018-01-16 20:38:00 +03:00
Dmitry Jemerov
e46f69bb36
Disable "Decompile" button if bytecode generation threw exception
...
#KT-13791 Fixed
2018-01-16 17:54:49 +01:00
Dmitry Jemerov
404f9cc7d8
KotlinBytecodeToolWindow: convert to .kt
2018-01-16 17:54:48 +01:00