Commit Graph

37344 Commits

Author SHA1 Message Date
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
Denis Zharkov 85f9e2e47b Fix CCE in generated code that happens when comparing boxed chars
The problem was that when obtaining char from the wrapper,
codegen used int as expected type that led
to a ClassCastException: java.lang.Character cannot be cast to java.lang.Number

The solution is using coercion to chars, it's still correct,
because of implicit widening coercion in JVM from C to I

 #KT-15105 Fixed
2017-02-21 12:33:45 +03:00
Denis Zharkov 378acbf7ec Minor. Clarify method patchOpcode contract 2017-02-21 12:33:45 +03:00
Alexander Udalov 21449763ab Add extension CompilerConfiguration.languageVersionSettings for convenience 2017-02-21 10:58:19 +03:00
Alexander Udalov 103bd6dbde Minor, convert CommonConfigurationKeys to Kotlin 2017-02-20 16:18:00 +03:00
Alexander Udalov d499998655 Inject CompilerConfiguration instead of LanguageVersionSettings
LanguageVersionSettings can be read from the configuration. Also, the
configuration may be used for other stuff, not related to language version
settings, soon
2017-02-20 16:18:00 +03:00
Alexander Udalov 4b31e75550 Refactor createContainerForLazyResolve/createLazyResolveSession 2017-02-20 16:18:00 +03:00
Alexander Udalov ee1152bc98 Simplify injection of LanguageVersionSettings into JVM analysis
Pass the LanguageVersionSettings instance inside the CompilerConfiguration,
since it's needed anyway. In compiler and tests, the configuration comes from
KotlinCoreEnvironment; in IDE, we're constructing it in JvmAnalyzerFacade
2017-02-20 16:18:00 +03:00
Denis Zharkov f2aacf774e Get rid of redundant not-null assertion for parameter
The problem was that in `Function<T>.apply(T)` T is now not-platform,
so when checking if not-null assertion is needed for parameter in SAM,
it's defined by the upper bounds of T that is a platform (Any..Any?),
and while it's definitely not marked as nullable it's still nullable
in a sense that it can contain null as a value.

So the solution is obvious

 #KT-16413 Fixed
2017-02-20 15:46:49 +03:00
Dmitry Jemerov 1bb7a617ad Don't overwrite explicitly specified language version in facet with version from dependencies; add tests for setting language version based on dependencies
(cherry picked from commit fc2b9f6)
2017-02-20 11:32:11 +01:00
Denis Zharkov a3baca829f Drop KotlinTarget.INNER_CLASS entry
In most of the cases it was used together with CLASS_ONLY and vice versa
They only case when CLASS_ONLY was used without INNER_CLASS
is possibleParentTargetMap.COMPANION_KEYWORD.

But after diagnostic NESTED_OBJECT_NOT_ALLOWED has been introduced,
there's no sense in the restriction of exactly the companion's parent

For clarification see test data changed
2017-02-20 13:24:42 +03:00
Denis Zharkov d1b17f050b Prohibit objects inside inner classes
#KT-16232 Fixed
2017-02-20 13:24:42 +03:00
Denis Zharkov 5b9b003e02 Prohibit inner sealed classes
#KT-16233 Fixed
2017-02-20 13:24:42 +03:00
Alexey Andreev 86d1c7b7ec JS: fix absence of temporary variable in secondary constructors. See KT-16377 2017-02-20 11:31:38 +03:00
Alexey Tsvetkov 3b222f13f3 Replace daemon's message after start with constant string
#KT-15783 fixed

When a daemon client cannot find an existing daemon, it starts a new one.
The client waits for a daemon to start and initialize.
Then the daemon is expected to signal that it is ready for compiling by printing message in stdout.
Before this change the message was the daemons' run path (a directory where all daemons store
their "flag" files).
However the path printed by the daemon was not matched by the path expected by the client somehow
on Windows for a user with a username containing non-English letters.
This commit replaces the message with the constant string.
2017-02-18 19:35:06 +03:00
Alexey Tsvetkov b2de822fd4 Start daemon with explicit server ip address to prevent host name resolution 2017-02-18 19:35:06 +03:00
Denis Zharkov 0d8f64353a Fix JVM signature mapping for multi-dimensional arrays
#KT-11314 Fixed
2017-02-17 17:50:43 +03:00
Dmitry Jemerov 83d64e8eba Don't replace explicitly configured project settings with autodetected ones
(cherry picked from commit f16f975)
2017-02-17 14:44:37 +01:00
Nikolay Krasko 7bae72113b Rename: ExtraSteppingFilter -> KotlinExtraSteppingFilter 2017-02-17 15:57:11 +03:00
Nikolay Krasko f7391f6c1a Minor: refactoring 2017-02-17 15:57:11 +03:00
Nikolay Krasko d58707972d Keep empty bodies for declarations with comments (KT-16078)
#KT-16078 Fixed
2017-02-17 15:57:11 +03:00
Denis Zharkov e16b0524b6 Fix inline codegen on local functions inside inlined lambda
The problem was that anonymous classes wasn't regenerated
although they capture another anonymous class that is a subject
for regeneration

 #KT-8689 Fixed
2017-02-17 13:48:19 +03:00
Alexey Tsvetkov dfb60ba4ac Minor: remove the word 'experimental' from Gradle IC description 2017-02-16 21:27:04 +03:00
Alexey Tsvetkov 62a15e803b Avoid storing absolute paths in SyncOutputTask
#KT-16003 fixed
2017-02-16 21:26:50 +03:00
Alexey Tsvetkov 6e0f3b7f1f Avoid having -d and -module set at the same time
#KT-14619 fixed
2017-02-16 21:26:50 +03:00
Alexey Tsvetkov 667c00e3ed Copy compiler arguments from compile task to kapt task
#KT-15994 fixed
2017-02-16 21:26:50 +03:00
Dmitry Jemerov 3225c93ce0 Don't pass paths to non-existing metadata files from dependent modules 2017-02-16 19:16:19 +01:00
Mikhail Glukhikh 797813a8d4 Change log update (final) for 1.1-RC 2017-02-16 18:55:14 +03:00
Dmitry Jemerov 6aa3c26f78 Disable facet detection; force detection of API/language level from dependencies on project opening 2017-02-16 16:51:09 +01:00
Dmitry Jemerov 58713270bb Ask to update runtime library when increasing language version for module 2017-02-16 16:50:47 +01:00
Alexander Udalov de2117663c Fix overload resolution ambiguity on *Array.clone() with runtime 1.0
#KT-16371 Fixed
2017-02-16 18:46:05 +03:00
Alexander Udalov 9d11f0b92f Minor, check every deserialized value in refsAreSerializable.kt 2017-02-16 18:00:19 +03:00
Alexander Udalov 1ee2053a16 Make callable references Serializable on JVM
#KT-11254 Fixed
2017-02-16 18:00:18 +03:00
Dmitry Jemerov 4d451356eb Quickfixes to enable unsupported and experimental features handle API level correctly and support updating the runtime library 2017-02-16 12:41:42 +01:00
Dmitry Jemerov ea228a2fa8 Fix testdata for SimpleKotlinRenderLogTest 2017-02-16 11:43:16 +01:00
Alexander Udalov 612481f0f4 Fix stub builder for builtins after cdeabf26b4 2017-02-16 10:35:07 +03:00
Alexander Udalov cdeabf26b4 Fix NPE from KotlinBuiltInDecompiler
This happened because of bae955aafd: similarly to the corresponding code in
the compiler, the IDE should also skip the metadata for kotlin.Cloneable when
decompiling built-ins because the deserializer is not going to resolve this
class from the metadata
2017-02-16 01:31:44 +03:00
Mikhail Glukhikh 4d4e2c5c94 Change log for 1.1-RC updated
(cherry picked from commit 4897af1)
2017-02-15 20:53:44 +03:00
Alexander Udalov 8e407d548a Suggest to provide explicit dependency on new kotlin-reflect
In case when there's kotlin-stdlib 1.1 and kotlin-reflect 1.0 in the classpath
2017-02-15 20:43:25 +03:00
Alexander Udalov 71fcb07fad Infer API version from older runtime in compiler's classpath
For example, if you invoke kotlinc 1.1 with kotlin-stdlib 1.0 in the classpath,
we now infer -api-version 1.0 automatically
2017-02-15 20:43:25 +03:00