Denis Zharkov
e9262b875b
Implement makeNullableAsSpecified for TypeTemplate properly
...
This change fixes an SOE in isCastErased:
@JvmStatic
fun isCastErased(supertype: KotlinType, subtype: KotlinType, typeChecker: KotlinTypeChecker): Boolean {
if (supertype.isMarkedNullable || subtype.isMarkedNullable) {
return isCastErased(TypeUtils.makeNotNullable(supertype), TypeUtils.makeNotNullable(subtype), typeChecker)
}
TypeUtils.makeNotNullable(TypeTemplate) should not return the same object
if isMarkedNullable returned true on the instance
#KT-15516 Fixed
2017-02-01 11:51:15 +03:00
Mikhail Glukhikh
dc57f97196
1.1-RC change log polishing
2017-01-31 19:01:03 +03:00
Ilya Gorbunov
3be8558a1a
Edit 1.1-RC changelog regarding Standard Library and JS
2017-01-31 18:45:53 +03:00
Mikhail Glukhikh
8d48452c1a
1.1-RC: change log (final?) update
2017-01-31 17:31:03 +03:00
Alexey Tsvetkov
c57dac159b
Avoid having -d and -module set at the same time
...
#KT-14619 fixed
2017-01-31 16:53:34 +03:00
Alexey Tsvetkov
9b5129a0f3
Fix annotation processors outputting to classes dir with kapt 3
...
#KT-15915 fixed
Annotation processor can access a classes directory provided by AP environment.
Previously kapt 3 was using kotlin-classes directory as a a classes directory.
However compileKotlin task does not expect this.
Also having multiple tasks with the same output dir is a bad practise in Gradle.
This change introduces a separate directory for classes generated by kapt 3.
Its output is copied to a resulting classes dir (just as a kotlin-classes dir).
2017-01-31 16:53:34 +03:00
Alexey Tsvetkov
34f04f3482
Fix downgrading from 1.1 to 1.0.x in Gradle
...
If @Input property is added in new plugin version
and this property has a new type (a class/enum which is not presented in previous plugin)
then downgrading leads to an exception,
because Gradle tries to deserialize the property value from its caches,
but the type of value does not exist.
Workaround: add new String property.
2017-01-31 16:53:34 +03:00
Alexey Tsvetkov
49d0f69227
Fix exception when Groovy lazy string (GString) is in freeCompilerArgs
...
#KT-15500 fixed
GString is an object that represents string literal like `"${project.name}"`
in Groovy. It is not an instance of string.
Groovy automatically converts GString to String when it is passed where String is expected.
However freeCompilerArgs is a List<String>, so type parameter info is lost at runtime.
When iterating freeCompilerArgs in Kotlin as a list of string, an exception
is thrown because GString cannot be casted to String (toString should be called instead).
2017-01-31 16:53:34 +03:00
Dmitry Jemerov
fa6bfe932e
More efficient implementation of containsFilesWithExactPackage() (don't materialize KtFile instances we don't actually need)
2017-01-31 14:44:28 +01:00
Dmitry Jemerov
62e1d49def
Make sure that we don't have multiple coroutine status flags in the facet settings if one flag was set before parsing the command line options and another is specified through the command line options.
...
#KT-16075 Fixed
2017-01-31 14:32:09 +01:00
Alexander Udalov
464820458e
JS: rename "-library-files" argument to "-libraries" and change separator
...
Use the system separator (':' or ';') instead of commas
#KT-16083 Fixed
2017-01-31 16:26:35 +03:00
Dmitry Jemerov
fd24031a69
Don't read file content to see if file is Kotlin-compiled if we have cached attribute but don't have complete data
2017-01-31 13:50:35 +01:00
Dmitry Jemerov
ffa3cf0027
Don't show "Convert lambda to reference" for lambdas passed to suspend functions
...
#KT-16072 Fixed
2017-01-31 13:42:38 +01:00
Mikhail Glukhikh
7021b0bf15
Change log update for 1.1.0
2017-01-31 15:21:13 +03:00
Simon Ogorodnik
c2ba4e3ab9
KT-14252 Completion could suggest constructors available via typealiases
...
#KT-14252 fixed
2017-01-31 15:14:18 +03:00
Denis Zharkov
39fc1789e0
Prohibit inline lambda parameters of suspend function type
...
#KT-16068 Fixed
2017-01-31 14:55:48 +03:00
Stanislav Erokhin
67835b642d
Do not show url for multi platform projects.
2017-01-31 13:07:54 +03:00
Mikhail Zarechenskiy
f3385e093e
Introduce language feature for type inference on generics for callable references
...
#KT-16061 Fixed
2017-01-31 01:15:02 +03:00
Nikolay Krasko
563196a8aa
Stop in the method with suitable name if no descriptor found
...
Absence of descriptor is possible when sources are outdated or absent.
Early stop is better than iterating in step into till the program end.
2017-01-30 21:28:59 +03:00
Nikolay Krasko
c8999c4141
Fix in test bad behaviour of smart step into for stored lambda
...
When lambda is stored and not executed immediately, smart step into
doesn't work.
2017-01-30 21:28:59 +03:00
Nikolay Krasko
4a4a8250fd
Fix smart step into functions call with suspend lambdas (KT-14700)
...
#KT-14700 Fixed
2017-01-30 21:28:59 +03:00
Nikolay Krasko
2add36ef32
Exclude errors descriptors from the set of conflicting declarations
...
Resolve hanging in evaluate expression
2017-01-30 21:28:59 +03:00
Alexander Udalov
ad0178ee64
Increase SOURCE_STUB_VERSION
...
Because of a974ed1 and b9f9894
2017-01-30 20:27:17 +03:00
Alexander Udalov
8811165de8
Report error on callable reference or class literal with "-no-stdlib"
...
Also workaround the NoSuchElementException that was happening because error
type never has any type arguments
#KT-14547 Fixed
2017-01-30 20:27:17 +03:00
Alexander Udalov
7371dc9b54
Minor, fix typo in assertion message
2017-01-30 20:27:17 +03:00
Alexander Udalov
424afba246
Add hint to use "-language-version", when applicable, in JVM runtime checker
2017-01-30 20:27:17 +03:00
Alexander Udalov
7167139c2e
Refactor JvmRuntimeVersionsConsistencyChecker for readability
2017-01-30 20:27:16 +03:00
Alexander Udalov
9e877b4a9e
Do not report error on libraries that bundle Kotlin runtime in classpath
...
Instead, report a strong warning, suggesting to remove such libraries from the
classpath
#KT-15995 Fixed
2017-01-30 20:27:16 +03:00
Alexander Udalov
2d975d74cb
Slightly refactor inline functions at serializationUtils.kt
...
Extract large bodies to separate functions, use KType.classifier instead of
KClass.createType
2017-01-30 20:22:54 +03:00
Alexander Udalov
f6c3aa0807
Fix JvmBuildMetaInfoTest.testSerialization
...
Do not check against hard-coded values of parameters, because they might be
changed a lot in the future
2017-01-30 20:22:54 +03:00
Mikhail Glukhikh
8bf233e686
Change log update for 1.1.0
2017-01-30 20:21:13 +03:00
Yan Zhulanow
1b337e1a48
Generate enum values with bodies properly (KT-15803)
2017-01-30 20:13:08 +03:00
Yan Zhulanow
18e0baa13e
Kapt: Allow empty .kt files list in kapt in order to support kapt with Java-only source files. (KT-15675)
2017-01-30 20:13:08 +03:00
Ilya Gorbunov
38b79a51d5
Fix tests after introducing exlcusions to default imports of kotlin.js package.
2017-01-30 19:44:51 +03:00
Ilya Gorbunov
33f3106157
Do not use Math in common code.
2017-01-30 19:44:51 +03:00
Ilya Gorbunov
66abea1f19
Add explicit imports of kotlin.js.* to stdlib where required.
2017-01-30 19:44:51 +03:00
Ilya Gorbunov
25c3064554
Add explicit imports of kotlin.js.* to generated files.
2017-01-30 19:44:51 +03:00
Ilya Gorbunov
cd5f68f119
Add exclusions to JS platform default imports
2017-01-30 19:44:51 +03:00
Alexey Andreev
d0b7dc8f4e
JS: don't fail when generating signature for function which refers to undefined type
2017-01-30 19:26:24 +03:00
Ilya Gorbunov
f4ef98c327
Remove test for named native
2017-01-30 19:21:41 +03:00
Ilya Gorbunov
c4a0bb727d
Change LoadBuiltinsTest testData, add runtime and import to box tests.
...
#KT-16030
2017-01-30 18:55:05 +03:00
Ilya Gorbunov
4ac7be9fa5
Retract bitwise operators from builtins for Byte and Short and add them as extensions in kotlin.experimental package in stdlib.
...
#KT-16030
2017-01-30 18:54:59 +03:00
Dmitry Jemerov
9b820202b5
Don't run decompiler to check whether reference is in copied fragment
...
#KT-16038 Fixed
2017-01-30 16:32:46 +01:00
Dmitry Jemerov
8968d5663d
Minor fixes for stdlb kdoc
2017-01-30 16:13:49 +01:00
Alexey Sedunov
60edc46d8c
Spring Support: Consider declaration open if it's supplemented with a preconfigured annotation in corresponding compiler plugin
...
#KT-15444 Fixed
2017-01-30 17:54:53 +03:00
Dmitry Jemerov
f73d32afeb
Look at parent project when checking whether the Kotlin Maven plugin is applied in a module
...
#KT-15954 Fixed
2017-01-30 15:53:37 +01:00
Alexey Andreev
06e8f7b328
JS: don't report error when FAKE function overrides external function with optional parameters. Report only when it overrides at least two such functions. See KT-15961
2017-01-30 17:26:07 +03:00
Simon Ogorodnik
d117b0210f
Revert "KT-14252 Completion could suggest constructors available via typealiases"
...
Reverted due problems with tests
This reverts commit 55eeb74c08 .
2017-01-30 16:46:38 +03:00
Anton Bannykh
77aa685496
JS: char boxing
2017-01-30 16:31:44 +03:00
Simon Ogorodnik
55eeb74c08
KT-14252 Completion could suggest constructors available via typealiases
...
#KT-14252 fixed
2017-01-30 16:24:12 +03:00