Commit Graph

42176 Commits

Author SHA1 Message Date
Alexander Udalov 8b0b334601 Extract shouldWritePreReleaseFlag(), use in JS as well as JVM
Fix the difference in behavior between JS and JVM
2017-10-16 15:09:36 +02:00
Alexander Udalov 0510c553c3 Mark class files as pre-release if language version > LATEST_STABLE
#KT-20547 Fixed
2017-10-16 15:09:36 +02:00
Alexander Udalov 3665255a2b Extract skipPreReleaseCheck out of DeserializationConfiguration.skipMetadataVersionCheck 2017-10-16 15:09:36 +02:00
Alexander Udalov 8a0dcca957 Do not consider 'expect' class type constructors final
Because even a final expected class can be actualized with an open
actual class and thus have subtypes in the platform code
2017-10-16 15:08:50 +02:00
Alexander Udalov 0a861fd4ed Minor, refine return type of AbstractClassTypeConstructor.getDeclarationDescriptor 2017-10-16 15:08:50 +02:00
Alexander Udalov dc02b2e3ab Fix TypeConstructor.isFinal for synthetic class descriptors
As in LazyClassTypeConstructor.isFinal, check if the class modality is
Modality.FINAL
2017-10-16 15:08:50 +02:00
Alexander Udalov 2682837fd7 Support 'expect final' -> 'actual open' for callables
#KT-17944
2017-10-16 15:08:50 +02:00
Alexey Sedunov ee9a6ca53e Introduce Type Parameter: Do not show duplicate dialog under write action
#KT-20335 Fixed
2017-10-16 16:04:39 +03:00
Alexey Sedunov 25b6dac7b5 Introduce Type Alias: Don't change non-nullable type to nullable alias
#KT-15840 Fixed
2017-10-16 16:04:39 +03:00
Alexey Sedunov 1c3a3cd651 Introduce Parameter: Forbid inside of default values 2017-10-16 16:04:39 +03:00
Alexey Sedunov 790b615fa1 Introduce Parameter: Fix parameter name validation
Respect existing parameter names and fix some exceptions

 #KT-19439 Fixed
 #KT-20402 Fixed
 #KT-20403 Fixed
2017-10-16 16:04:39 +03:00
Alexey Sedunov bf3769f37e Introduce Parameter: Forbid inside of annotation entries
#KT-18594 Fixed
2017-10-16 16:04:38 +03:00
Alexey Sedunov e2fd9a71df Rename: Search text occurrences by declaration FQ name
#KT-17949 Fixed
 #KT-15932 Fixed
2017-10-16 16:04:38 +03:00
Alexey Sedunov e68f8d6d45 Kotlin Ultimate: Support Protractor run configurations for module directory 2017-10-16 16:04:38 +03:00
Ilya Gorbunov 18d4b91b2d Minor: improve message from future for use and useLines
Annotate RequireKotlin and apiVersionIsAtLeast with SinceKotlin
2017-10-15 21:40:17 +03:00
Ilya Gorbunov 88bb14d0b4 Add kotlin-test-junit dependency to compiler stdlib tests 2017-10-15 21:40:15 +03:00
Ilya Gorbunov 20b122c1dd Use kotlin.test.Test instead of org.junit.Test in common stdlib tests
(and in jvm-only and js-only tests also)
2017-10-15 17:40:53 +03:00
Ilya Gorbunov f002493218 Multiplatform test annotations
Actual annotations are provided in kotlin-test-junit on JVM side
and in kotlin-test-js on JS side.

#KT-19696
2017-10-15 17:40:53 +03:00
Anton Bannykh 4b1b847f0a Updated the forum link in NPM README.md templates 2017-10-14 02:18:43 +03:00
Anton Bannykh 2d3929ee58 JS: add ant tasks for publishing kotlin-test-js to NPM (KT-19682) 2017-10-14 02:18:43 +03:00
Anton Bannykh 7076fda542 JS: added back integration test for @BeforeTest and @AfterTest annotations
The test was removed in e5cfd198c7 in order
to prevent gradle tests from crashing when running with the old compiler.
2017-10-14 02:16:22 +03:00
Anton Bannykh b5d32f420d JS: correct Double and Float conversions to Int (KT-8374 fixed) 2017-10-13 20:29:28 +03:00
Alexander Udalov a52d719943 Fix Java9ModulesIntegrationTest.testDependencyOnReflect
Since javac is invoked on a module-info with a reference to the module
kotlin.reflect, we need to pass kotlin-reflect.jar in the module path
2017-10-13 18:45:45 +02:00
Ilya Gorbunov 863727955f Annotate inline use and useLines with RequireKotlin
Compiler version 1.2 is required to use 'use' and inline functions from stdlib that call it.
2017-10-13 18:56:05 +03:00
Ilya Gorbunov cc150ca832 Make Closeable.use call addSuppressed
Call addSuppressed when it's provided by the supplementary artifact for jdk7, and only when targeting apiVersion > 1.1

#KT-18961 Fixed
2017-10-13 18:56:05 +03:00
Ilya Gorbunov 3ab7946c4d Introduce apiVersionIsAtLeast function to branch in inlines
#KT-16028
2017-10-13 18:56:05 +03:00
Ilya Gorbunov 485ca10b84 Improve failed assertSame/NotSame messages, correct tests 2017-10-13 18:53:52 +03:00
Jake Wharton e611b9a9ba Add assertSame and assertNotSame methods. 2017-10-13 18:53:52 +03:00
Dmitry Savvinov edd3f76e7b Add contract for takeUnless 2017-10-13 18:43:39 +03:00
Dmitry Savvinov 0b88e7cfd0 Annotate contract DSL with @SinceKotlin 2017-10-13 18:43:39 +03:00
Alexander Udalov 5f775497e2 Add Kotlin package FQ name to kotlin.Metadata
It might differ from the JVM package FQ name if the JvmPackageName
annotation is used. This will be useful for faster indexing in the IDE
and for reflection
2017-10-13 16:23:07 +02:00
Dmitry Petrov 16b7bece46 Fix constant expression inlining logic
Constant expressions are inlined if they do not depend on non-inlineable
vals.
Java constants are always inlined.
Kotlin constants are inlined in LV 1.1+.
2017-10-13 17:01:42 +03:00
Yan Zhulanow 5acc992956 Disable uninitialized object copying checks for Parcelable writeToParcel() to createFromParcel() 2017-10-13 16:35:42 +03:00
Yan Zhulanow 824e0a072e Minor: Add dependency to android-extensions-runtime to get rid of compile errors in IDE 2017-10-13 16:35:41 +03:00
Yan Zhulanow eb39c4c590 Tests: Do not search for android-extensions-runtime in KOTLIN_PATH 2017-10-13 16:35:40 +03:00
Mikhail Zarechenskiy 61d1963ddb Mark incompatibilities related to the declaration signature as STRONG 2017-10-13 16:14:43 +03:00
Mikhail Zarechenskiy d557c19a88 Test for consistent modality check with implicit and explicit override
Test for KT-20680
2017-10-13 16:14:40 +03:00
Mikhail Zarechenskiy b2dc82f17e Improve diagnostic for non-actual declaration with weak incompatibility 2017-10-13 16:14:17 +03:00
Mikhail Zarechenskiy d0cbd73307 Don't report incompatibility expect/actual errors on usual overloads
Divide incompatibility on two groups: strong and weak. Strong incompatibility means that if declaration with such incompatibility has no `actual` modifier then it's considered as usual overload and we'll not report any error on it.

 #KT-20540 Fixed
 #KT-20680 Fixed
2017-10-13 16:14:14 +03:00
Mikhail Zarechenskiy eb828e3497 Report errors about incompatible constructors of actual class
#KT-20540 In Progress
 #KT-20680 In Progress
2017-10-13 16:13:40 +03:00
Ilya Gorbunov 748dbc382c Advance bootstrap to 1.2.0-dev-92 2017-10-13 15:17:34 +03:00
Sergey Igushkin 9d62bb3561 (minor) Reorder args help in test data after the property was renamed 2017-10-13 14:02:42 +03:00
Dmitry Petrov 08b7578e61 Add -Xnormalize-constructor-calls=enable to stdlib submodules 2017-10-13 10:17:13 +03:00
Pavel V. Talanov df4b90fcb6 Scripts: Accept objects as DependenciesResolver implementations
Fixes DependenciesResolver.NoDependencies causing "missing constructor without parameters" warning
2017-10-12 19:22:59 +03:00
Simon Ogorodnik 4972dbfc2d KT-17165: Support array literals in annotations in completion
#KT-17165 fixed
2017-10-12 18:15:53 +03:00
Zalim Bashorov beec788bd4 KJS: improve declaration for JS Promise and add helpers to simplify some usecases
* add `then` with only one parameter to make usages from Kotlin more idiomatic
* add overload static `resolve` which accepts Promise<S> according to the spec
* add helper functions for `then` to simplify chained usages
  when Promise is returned from `then` or `catch` (workaround for KT-19672)
2017-10-12 18:07:09 +03:00
Simon Ogorodnik 30853d5f85 Show missing deps when preloaded deps not found 2017-10-12 17:34:55 +03:00
Alexander Udalov f46c509b31 Regenerate tests 2017-10-12 16:18:29 +02:00
Anton Bannykh b839ba5015 JS: correct imports in kotlin.test-js integration test 2017-10-12 15:41:54 +03:00
Sergey Igushkin 260244fa09 (minor) Fix bad file content replacement in a test. 2017-10-12 15:14:07 +03:00