Commit Graph

37833 Commits

Author SHA1 Message Date
Denis Zharkov ecec87cbc7 Refine signature calculation for methods with default parameters
The problem was that he number of mask parameters for defaults when
generating methods declaration was being calculated upon resulting signature
(with additional parameters: extension receivers, enum name/ordinal),
while on call-sites the masks number was calculated by the arguments number
in resolved call, i.e. by the number of real value parameters.

And because of the additional synthetic parameters (like enum.ordinal) these
two numbers could be different.

The solution is just to use value parameters number in both places.
Note, that we only count value parameters from the original sourse
declaration, ignoring synthetic ones generated by backend (e.g.
Continuation for suspend functions)

 #KT-14565 Fixed
2017-02-28 10:42:07 +03:00
Denis Zharkov 9e03b712de Use flexible upper bound of parameter's type for vararg argument
See the issue and the test. The problem was that when generating
call to `foo` method in member scope of `AT<*>` its resulting descriptor
after substitution and approximation was: fun foo(x: Nothing..Array<out Nothing>).

This signature is correct, but when using this parameter type
for generating a vararg argument the assertion is violated that
the type of the argument must be an array
(by default we're using lower flexible bound everywhere)

The solution is using upper bound for flexible types that should
always have a form of Array<out T> for varargs (even for such corner cases)
both for Kotlin and Java declarations.

 #KT-14607 Fixed
2017-02-28 10:40:54 +03:00
Alexey Sedunov 14dad61fe5 Kotlin Facet: Import more configuration options from Maven
(cherry picked from commit dca696f)
2017-02-28 03:06:54 +03:00
Alexey Sedunov 90c2b14051 Kotlin Facet: Import Maven option specified in <jvmTarget> element
#KT-16329 In Progress
2017-02-28 03:05:13 +03:00
Nikolay Krasko b9b4cce293 Set JVM target from facet settings on compiler configuration creation
Otherwise analyse in IDE is perfomed under default JVM target and wrong
diagnostics are reported.

 #KT-16329 In Progress
2017-02-28 02:32:59 +03:00
Roman Elizarov 266d7c15fe Documentation for createCoroutine/createCoroutineUnchecked 2017-02-27 16:48:24 +03:00
Nikolay Krasko f0be88fc07 Use doResume name for suspend lambdas context (KT-16481)
#KT-16481 Fixed
2017-02-27 14:49:13 +03:00
Nikolay Krasko dffbe0f707 Count JVM class name for inlined function from base declaration
Drop code with naive removing all anonymous classes.
Breakpoints now works when inline call is in anonymous call.
2017-02-27 14:49:12 +03:00
Nikolay Krasko cd92e3fc98 Refactoring: use constants instead of string literals 2017-02-27 14:49:11 +03:00
Ilya Chernikov fa5728b288 Use Void instead of Unit in RMI calls, should fix EA-82064
("Could not initialize class Kotlin.Unit")

(cherry picked from commit b3a1311)
2017-02-24 16:58:25 +01:00
Ilya Chernikov 00e8dfe1be Use sessions with connection to eliminate async shutdown problems
(cherry picked from commit 78d334b)
2017-02-24 16:58:25 +01:00
Ilya Chernikov 4202bde550 Make daemon connection more reliable by retrying on certain exceptions
(cherry picked from commit 74a0711)
2017-02-24 16:58:25 +01:00
Ilya Chernikov c7a2422314 minor: Make parallel daemong start test less demanding 2017-02-24 16:58:25 +01:00
Ilya Chernikov 6d9ecc60ef Skip metadata version check in repl, improve JSR 223 template compatibility 2017-02-24 16:58:25 +01:00
Ilya Chernikov a16f412b48 Add eval in eval benchmark tests 2017-02-24 16:58:25 +01:00
Ilya Chernikov 1ae95853e7 Fix merging errors 2017-02-24 16:58:25 +01:00
Ilya Chernikov d3682b7f7d Implement JSR 223 script template with eval functions, some fixes 2017-02-24 16:58:25 +01:00
Ilya Chernikov 63aae56b11 Get rid of eval on daemon completely, fixes also JSR 223 examples 2017-02-24 16:58:24 +01:00
Ilya Chernikov a3a782613a Cleanup 2017-02-24 16:58:24 +01:00
Ilya Chernikov 1032f0d39c Fix java 8 repl tests 2017-02-24 16:58:24 +01:00
Ilya Chernikov b9469a9308 Fix script-util after changes in repl infrastruct 2017-02-24 16:58:24 +01:00
Ilya Chernikov 75234701c7 Fix remote repl state facade 2017-02-24 16:58:24 +01:00
Ilya Chernikov b23911fd59 Reintroduce history check between compile and eval, place generation into code line and id 2017-02-24 16:58:24 +01:00
Ilya Chernikov 7b2ea001c1 Fix state conversion, fix tests 2017-02-24 16:58:24 +01:00
Ilya Chernikov c5bc58ad32 Implement remote part of the new repl state handling 2017-02-24 16:58:24 +01:00
Ilya Chernikov f9dedab8c8 Extract repl state as a separate object 2017-02-24 16:58:24 +01:00
Anton Bannykh 3eb5b3e08c JS: changed BoxedChar visibility to internal 2017-02-24 13:46:29 +03:00
Dmitry Jemerov 5c9f0df256 Download specific build of IJ 162, not a snapshot 2017-02-24 11:19:43 +01:00
Nikolay Krasko 6b62686019 Add blank lines tab to Kotlin code style UI with two basic options
KEEP_BLANK_LINES_IN_CODE
KEEP_BLANK_LINES_IN_DECLARATIONS

#KT-15504 In Progress
2017-02-22 20:13:28 +03:00
Nikolay Krasko bc90d52873 Minor: remove warnings in KotlinSpacingBuilder.kt 2017-02-22 20:13:24 +03:00
Nikolay Krasko 6a4590839c Don't merge two lines in formatter after line comment (KT-16032)
#KT-16032 Fixed
2017-02-22 20:12:19 +03:00
Nikolay Krasko 20f92c6200 Use own kotlin settings for spacing instead of default set
Mostly affected by settings:
- KEEP_LINE_BREAKS,
- KEEP_BLANK_LINES_IN_DECLARATIONS
- KEEP_BLANK_LINES_IN_CODE

Allow settings KEEP_LINE_BREAKS in UI.
2017-02-22 20:04:34 +03:00
Nikolay Krasko 5ed5f8f048 Minor: reuse DO_RESUME_METHOD_NAME constant instead of literal 2017-02-22 19:58:50 +03:00
Alexander Udalov a9678010a8 Invert LanguageFeature responsible for warning on coroutines
The problem was that LanguageVersionSettingsImpl.DEFAULT did not have
"WarnOnCoroutines" as a feature and so it was manually added to the settings,
but only in two places: in the compiler and in the IDE
2017-02-22 18:55:48 +03:00
Dmitry Jemerov e3dab96715 Add Trove4j license 2017-02-22 16:04:33 +01:00
Ilya Gorbunov 6e8f227121 Drop ERROR deprecations in JS library that were introduced in 1.1-rc 2017-02-22 17:28:02 +03:00
Ilya Gorbunov b393c66426 Drop ERROR deprecations from kotlin-reflect. 2017-02-22 17:28:02 +03:00
Ilya Gorbunov c0c01d6e49 Drop HIDDEN deprecations from kotlin-stdlib. 2017-02-22 17:28:02 +03:00
Ilya Gorbunov 8e951dee16 Drop remaining ERROR deprecations from kotlin-stdlib-js.
Leave only `native`, `parseInt`, `parseFloat` and `noImpl`.
2017-02-22 17:28:02 +03:00
Ilya Gorbunov eebb820060 Do not refer to java packages in common completion tests 2017-02-22 17:28:02 +03:00
Ilya Gorbunov 3cea5c4510 Drop entire java.util package from kotlin-stdlib-js
#KT-6561 Fixed
2017-02-22 17:28:02 +03:00
Ilya Gorbunov 5867d27fb7 [Standard Library] Take the javaClass deprecation back as its replacement is often inconvenient. 2017-02-22 17:27:20 +03:00
Alexander Udalov d124912c91 Specify language / API version in .idea/kotlinc.xml 2017-02-22 14:45:57 +03:00
Anton Bannykh 909d83c3af JS: Force Rhino to load files using UTF8 encoding. Fixes failing kt14597 on windows agents. 2017-02-22 14:39:46 +03:00
Alexey Andreev 66f5a12cc4 JS: fix translation of && and || operators when their RHS declare temporary variables. See KT-16350 2017-02-22 11:10:07 +03:00
Dmitry Jemerov c6bfb02754 Move JsAnalyzerFacade to ide-common module to enable its use in Dokka 2017-02-21 18:39:21 +01:00
Stanislav Erokhin 0a24bf1613 Fix type deserialization for suspend function types which was written by pre-release compiler.
Notes: if arity == 0, it means that type was `suspend () -> String` => arguments.size == 1, and it means that SuspendFunction0 has only one type argument and it is return type.
2017-02-21 17:26:07 +03:00
Stanislav Erokhin 81df7645e0 Fix potential CCE -- use unwrappedType after instanceof check. 2017-02-21 17:19:50 +03:00
Mikhael Bogdanov d24ebf711b Fix for KT-16441: NoSuchFieldError: $$delegatedProperties when delegating through provideDelegate in companion object
#KT-16441 Fixed
2017-02-21 13:01:40 +01:00
Mikhael Bogdanov a8625b632d Fix for KT-16411, KT-16412: Exception from compiler when try call SAM constructor where argument is callable reference to nested class inside object
#Fixed KT-16411
  #Fixed KT-16412
2017-02-21 11:40:25 +01:00