Mikhael Bogdanov
6f5d459e09
Reorganize build logic in AndroidTestGenerator.kt
2017-10-24 15:26:20 +02:00
Mikhael Bogdanov
e151b8f641
Update Android tests
2017-10-24 15:26:19 +02:00
Alexey Sedunov
17abce2811
Misc: Support light-classless classes in inheritors search
...
In particular, support line markers for expect-classes
and navigation to expect-classes from their base class
#KT-20329 Fixed
2017-10-24 15:43:51 +03:00
Alexey Sedunov
87f3d24f9b
Misc: Protect freeArgs with FreezableVar
2017-10-24 15:43:51 +03:00
Dmitry Petrov
f23dfdc0ac
Mark operands of POP2 as don't touch in unused expression elimination
...
Fixes KT-20879.
2017-10-24 15:38:15 +03:00
Alexander Udalov
bafc75ade4
Fix isInitialized receiver generation for empty LHS
...
#KT-20774 Fixed
2017-10-24 11:26:01 +02:00
Mikhail Zarechenskiy
73b3efd628
Remove LANGUAGE_VERSION directive from blackBox codegen tests
2017-10-24 11:44:02 +03:00
Mikhail Zarechenskiy
7a934d74e5
Support !LANGUAGE directive in codegen tests
...
LANGUAGE_VERSION directive will be removed later, for now it's left for simplicity
2017-10-24 11:44:02 +03:00
Dmitry Petrov
68870a16bb
Remove CLI help on 'preserve-class-initialization' mode
...
See https://youtrack.jetbrains.com/issue/KT-19532#comment=27-2492178
2017-10-24 09:36:56 +03:00
Alexander Udalov
f2be34ca1c
Support KClass<*> annotation arguments in serialization/deserialization
...
#KT-11586 Fixed
2017-10-23 19:16:44 +02:00
Alexey Andreev
6adb62f3a2
JS: prohibit declaration names that clash with JS builtin functions
...
See KT-18095, KT-17475, KT-18105, KT-5259
2017-10-23 17:19:52 +03:00
Alexey Andreev
e0eea15a4c
Fix JS tests failing on Windows
2017-10-23 17:19:51 +03:00
Alexey Andreev
d9d565d8b0
JS: use 'external' word instead of 'native' in diagnostic messages
...
See KT-20639
2017-10-23 17:19:48 +03:00
Zalim Bashorov
f9809d5a73
Minor: replace IGNORE_BACKEND with TARGET_BACKEND for the test what should be run only on JVM
...
The test was written to check the case for Platform Types which now exists only on JVM.
2017-10-20 21:02:10 +03:00
Mikhail Glukhikh
4b8c04a3d6
Minor: fix typo
2017-10-20 15:16:03 +03:00
Denis Zharkov
da52716bfd
Fix wrong nullability enhancement for annotated java.lang.Object type
...
Effectively, this commit drops cached value for j.l.Object type
This cache was introduced when types were immutable, but they
became mutable after starting reading top-level TYPE_USE annotations,
that lead to changing shared JAVA_LANG_OBJECT_CLASSIFIER_TYPE instance
#KT-20826 Fixed
2017-10-20 09:43:38 +03:00
Dmitry Savvinov
5b9b8778b5
Minor: rename 'mapToPlatformClasses' -> 'mapToPlatformIndependentClasses'
2017-10-19 18:21:56 +03:00
Dmitry Savvinov
58b815d842
Fix false USELESS_CAST in function with expression body
...
Note that current behaviour is made similar to the case with
properties initializers/accessors, which means that more complex
cases are not covered yet (see KT-20801) #KT-20802 fixed.
2017-10-19 18:21:56 +03:00
Dmitry Savvinov
a1778a7da8
Fix CAST_NEVER_SUCCEEDS when casting Nothing to some type
2017-10-19 18:21:56 +03:00
Kartik Patodi
dc6c19d7ef
Normalize files that are gotten from FileUtil.createTempDirectory
...
It's required to avoid getting different paths inside tools (compiler, ant etc) and in tests.
2017-10-19 16:12:13 +03:00
Ilya Chernikov
5284db8088
Add compiler proguard rule for keeping ProgressManager used in webdemo
2017-10-19 13:55:00 +02:00
Alexander Udalov
6e410cb182
Make TypeConstructor.isFinal return false for enums
...
The reason is that before dc02b2e3ab and 8a0dcca957 ,
TypeConstructor.isFinal for some class descriptors
(DeserializedClassDescriptor, LazyJavaClassDescriptor,
MutableClassDescriptor) were implemented as `isFinalClass` (which is
`modality == FINAL && kind != ENUM_CLASS`), and all others as
`modality == FINAL` or simply true/false. This led to differences in
behavior depending on the exact instance of the class descriptor.
Now that TypeConstructor.isFinal is always `modality == FINAL`, some
tests (PseudoValueTestGenerated) fail because the finality of some type
constructors changed and these tests render final vs non-final type
constructors differently.
In this commit, TypeConstructor.isFinal is now made to behave safer,
i.e. considering enum class type constructor to be non-final (as was the
case earlier for some ClassDescriptor instances). Some diagnostics might
disappear (e.g. FINAL_UPPER_BOUND) but it doesn't look like a big deal
2017-10-18 12:45:45 +02:00
Alexander Udalov
825aff7ac6
Minor, do not produce trailing spaces in AbstractPseudoValueTest
2017-10-18 12:45:45 +02:00
Ilya Chernikov
050403d15b
Use rewriteDeps task on the projects with runtime dependency on embeddable compiler...
...
which are using shaded dependencies
2017-10-16 21:48:35 +02:00
Yan Zhulanow
43a1162b25
Evaluate: Fix for evaluating local variables captured by an inline function (KT-17514)
2017-10-16 21:25:44 +03:00
Yan Zhulanow
fed5bddde2
Android Extensions: Initial IC support (KT-14125)
2017-10-16 21:25:42 +03:00
Stanislav Erokhin
fde1ac5575
Add test for ExpectedTypeFromCast feature
2017-10-16 20:10:57 +03:00
Mikhail Glukhikh
3fb0354676
Minor: add / fix comments (related to KT-20752)
2017-10-16 20:00:47 +03:00
Alexey Andreev
46526db8f0
JS: fix behaviour of char-returning functions with multiple inheritance
...
See KT-19772
2017-10-16 18:56:33 +03:00
Stanislav Erokhin
b9fa8d4d96
Support parenthesized left expression for ExpectedTypeFromCast
2017-10-16 18:28:57 +03:00
Mikhail Glukhikh
e73e4dcc6a
Delay elvis-bound smart casts to version 1.3
2017-10-16 16:21:46 +03:00
Mikhail Glukhikh
a55c6f0c95
Don't register safe cast type info for unstable values
...
Important: to be removed in 1.3
So #KT-20752 Fixed
2017-10-16 16:21:45 +03:00
Denis Zharkov
8ae3dbdcfc
Refine ClassDescriptor::isCommonFinalClass definition
...
Do not treat annotations as final classes as they are not final in Java
#KT-20776 Fixed
2017-10-16 16:11:35 +03:00
Alexander Udalov
03baa51f82
Write isPreRelease into JvmBuildMetaInfo for non-stable language version
2017-10-16 15:09:37 +02:00
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
Ilya Gorbunov
88bb14d0b4
Add kotlin-test-junit dependency to compiler stdlib tests
2017-10-15 21:40:15 +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
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
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