Commit Graph

37109 Commits

Author SHA1 Message Date
Mikhail Glukhikh 6db698f5aa Correct order added for 'suspend' modifier #KT-16104 Fixed 2017-02-03 18:24:47 +03:00
Vyacheslav Gerasimov 1452129b60 Fixed InvalidMirrorException in uast while getting annotation argument location 2017-02-03 18:06:05 +03:00
Vyacheslav Gerasimov bad15249e7 Fixed exception in android lint 2017-02-03 18:06:05 +03:00
Vyacheslav Gerasimov 1ea2e8c1d1 Fixed KotlinLintTestGenerated.testJavaPerformance 2017-02-03 18:06:05 +03:00
Vyacheslav Gerasimov 6699b03c0b Fixed error reporting in AnnotationDetector
#KT-14920 Fixed

(cherry picked from commit 3647d53)
2017-02-03 18:06:05 +03:00
Vyacheslav Gerasimov 10517c16ee Uast 1.0.9 2017-02-03 18:06:04 +03:00
Denis Zharkov 5888c75d41 Minor. Refine implicit receiver for destructuring scope
Actually it should not be very important, but for sake of consistency
we should use null receiver even if we have one in an outer scope

This is a post-review fix
2017-02-03 17:58:52 +03:00
Ilya Gorbunov da81fb32a6 Add LowPriority annotation to deprecated functions to allow star-importing their replacements from kotlin.reflect.full. 2017-02-03 17:53:16 +03:00
Ilya Gorbunov af443ac046 Search java version in java.specification.version, prepare to that starting from java 9 it will contain only a single component. 2017-02-03 17:52:13 +03:00
Alexey Tsvetkov 62e42d6f45 Fix kapt1 with stubs test to main internal references 2017-02-03 17:16:08 +03:00
Alexey Tsvetkov de24e68adc Revert "Avoid having -d and -module set at the same time"
This reverts commit ac241e267648e9344d718c3a44446c6e13d8d2e4.
2017-02-03 17:16:08 +03:00
Denis Zharkov 2d88419c38 Fix annotation deserialization on suspend functions
Use proper initial/frontend version of suspend descriptor
when writing METHOD_FOR_FUNCTION, because serializer uses this version

Also this commit contains adjustments of neighboring code to the describe
change

 #KT-16093 Fixed
2017-02-03 16:44:22 +03:00
Sergey Igushkin 2516583ecf Fixed empty -libraries passed from Gradle plugin in CLI. 2017-02-03 13:20:53 +03:00
Anton Bannykh f0e3c87b84 JPS: fixed duplicate meta.js in case of multiple source roots in the same module. 2017-02-03 13:03:12 +03:00
Anton Bannykh 289a7a9cc3 JS: fixed support for test source roots (KT-6627) 2017-02-03 13:03:12 +03:00
Alexey Andreev 97b6c3013a JS: fix destructuring declaration and increment in coroutines. See KT-16058 2017-02-03 11:09:10 +03:00
Alexey Andreev b929db1b07 JS: don't generate object literal for local delegated properties, generate call to getValue/setValue on each use site instead. 2017-02-03 11:09:10 +03:00
Alexey Andreev 0f049a90aa JS: prohibit nested classes, objects and enums in external interface. See KT-16012 2017-02-03 11:09:09 +03:00
Denis Zharkov cc28fecacd Fix VerifyError in coroutines caused by null spilling
While within a method by the JVM spec null-value has a special
Nothing-like type, when we spill it for a coroutine, we must choose
some real type to CHECKCAST to after restoring the variable's value.

But the problem is that such a real type depends on usage of that null value,
and there may be more than one usage.

The solution is not to spill such variables into fields, but instead
init them with ACONST_NULL after each suspension point

 #KT-16122 Fixed
2017-02-03 10:32:28 +03:00
Denis Zharkov 60c2579436 Allow destructuring in suspend lambda with suspend componentX
#KT-16113 Fixed
2017-02-03 10:32:28 +03:00
Alexey Sedunov 59fe7444d1 Rename/Find Usages: Disable text occurrence search for KtParameter 2017-02-02 19:09:20 +03:00
Alexey Sedunov 79e67f4e50 Kotlin Facet: Support multiple artifact Ids corresponding to target platform 2017-02-02 19:09:19 +03:00
Mikhael Bogdanov aa3f64bc93 Temporary disable new intrinsics usage in ieee754 arithmetic 2017-02-02 16:31:49 +01:00
Mikhael Bogdanov 560226cc84 Use proper type for nullability check in 'calcTypeForIEEE754ArithmeticIfNeeded' 2017-02-02 16:31:49 +01:00
Mikhael Bogdanov 5cffb3892d Added intrinsics for nullable Double/Float equals check 2017-02-02 16:31:49 +01:00
Mikhael Bogdanov 87529f957d Update for "Fix for KT-15868: NPE when comparing nullable doubles" 2017-02-02 16:31:49 +01:00
Denis Zharkov 529b526763 Support parameter destructuring in suspend lambdas
#KT-16092 Fixed
2017-02-02 18:09:19 +03:00
Denis Zharkov 0878049f15 Support tailrec suspend functions in JVM backend
The main problem is that inside a state machine for a named suspend
function parameters of it's owner are available as a usual captured
closure parameters (i.e. through synthetic fields), while
TailRecursion codegen expects that parameters are straight local
variables.

So, the solution is just to define local var for each of real parameters
(all but the last continuation parameters) for tailrec functions.

 #KT-15759 Fixed
2017-02-02 18:09:19 +03:00
Denis Zharkov d7403ca185 Minor. Simplify ClosureCodegen.calculateConstructorParameters 2017-02-02 18:09:19 +03:00
Denis Zharkov a167539d2e Minor. Move recordField call into Closure.captureVariable 2017-02-02 18:09:19 +03:00
Mikhail Glukhikh 212f6e0432 Stub creation from cls fixed for suspend function types
(cherry picked from commit f49ef8e)
2017-02-02 17:54:06 +03:00
Stanislav Erokhin a4272caa8c Fix serialization for suspend function types.
Since now `suspend (Int) -> String` will be serialized as `(Int, Continuation<String>) -> Any?` + suspend flag.

Before this change such type serialized like this: Function2<Int, String> + suspend flag. And yes, type `Function2<Int, String>` isn't correct, because Function2 expect 3 type arguments.
We have special logic for this case and we deserialize such error-written types correctly.

(cherry picked from commit 3518cbe)
2017-02-02 16:48:59 +03:00
Stanislav Erokhin 382122470f Use LanguageVersionSettings from project instead of LanguageVersionSettingsImpl.DEFAULT for sdk and library resolver.
General effect will be the following:
- all member scopes for libraries and JDK will be constructed with -language-version/-api-version specified in project settings
- for modules with another (not like in project settings) -api-version or -language-version we will have not correct member scope -- for example we will see typealiases from such libraries.

#KT-15979 Fixed

(cherry picked from commit 0001865)
2017-02-02 16:47:53 +03:00
Dmitry Jemerov ac4be88627 Prevent duplicate addition of "org.jetbrains.kotlin" prefix when copying sources to Maven projects 2017-02-02 14:06:55 +01:00
Mikhail Glukhikh 4c2ae5e3dd Generate test support: error hints moved out of write action 2017-02-02 15:33:18 +03:00
Mikhail Glukhikh d8f0167d1f Let implement interface: create write action manually to avoid AWT events inside 2017-02-02 15:29:31 +03:00
Mikhail Glukhikh b839e522e9 Generate equals or hash code: do not run in write action to avoid AWT events inside 2017-02-02 15:29:30 +03:00
Mikhail Glukhikh a204e57877 Move file to package matching directory: run write action manually to avoid AWT events inside 2017-02-02 15:29:29 +03:00
Mikhail Glukhikh 72b8b85563 Create kotlin sub class: run write action manually to avoid AWT events inside 2017-02-02 15:29:27 +03:00
Mikhail Glukhikh 9664a066a4 Generate test support: ask everything before write action to avoid AWT events inside 2017-02-02 15:29:26 +03:00
Mikhail Glukhikh 70c5d8b9ad Create test intention: do not start in write action to avoid AWT events inside 2017-02-02 15:29:25 +03:00
Mikhail Glukhikh 07f06352d7 if-then --> safe access: run write action manually to avoid AWT events inside 2017-02-02 15:29:23 +03:00
Mikhail Glukhikh 834c3f5d62 if-then --> elvis: run write action manually to avoid AWT events inside 2017-02-02 15:29:22 +03:00
Dmitry Jemerov 9594147c55 Find Usages checks that the signature of the method a property usage resolves to matches the signature of the method being searched
#KT-15291 Fixed
2017-02-02 12:44:54 +01:00
Alexey Sedunov dbfe3370aa Kotlin Facet: Ignore invalid platform-specific compiler arguments 2017-02-02 13:40:11 +03:00
Mikhael Bogdanov 1e2b50332d Test data update 2017-02-02 09:39:03 +01:00
Mikhail Glukhikh 5f6d65cd44 Change log: last-shot issues for 1.1-Beta2 2017-02-01 21:06:51 +03:00
Mikhail Glukhikh a15454429d Change log: 1.1-RC --> 1.1-Beta2
(cherry picked from commit 7ee259d)
2017-02-01 21:01:21 +03:00
Dmitry Jemerov bc9c40883c Avoid repeated reading of file contents from disk while building stubs 2017-02-01 18:14:57 +01:00
Dmitry Jemerov 66f7382e3a Advance binary stub version due to coroutine metadata format changes 2017-02-01 18:10:50 +01:00