Commit Graph

46735 Commits

Author SHA1 Message Date
Denis Zharkov 3d3d21cb93 Minor. Extract function in TypeDeserializer 2018-06-21 16:02:13 +03:00
Denis Zharkov 9deb9473d2 Minor. Reformat TypeDeserializer.kt 2018-06-21 16:02:13 +03:00
Denis Zharkov 3fcf2f9c0d Minor. Move KOTLIN_SUSPEND_BUILT_IN_FUNCTION_FQ_NAME constant to 'core'
It will be used for deserialization of kotlin.suspend in the next commit
2018-06-21 16:02:13 +03:00
Denis Zharkov effdcddeca Minor. Extract createDefaultFakeSMAP in InlineCodegen 2018-06-21 16:02:13 +03:00
Toshiaki Kameyama 5a4cba7528 "To raw/ordinary string literal" intention: Move cursor to same offset after conversion #KT-18106 Fixed (#1675) 2018-06-21 15:56:18 +03:00
Alexander Udalov 51c01c15b8 Refactor KotlinCoreEnvironment, fix warnings 2018-06-21 14:47:28 +02:00
Alexander Udalov d2f278b601 Minimize content of version-specific bunch files for KotlinCoreEnvironment 2018-06-21 14:47:27 +02:00
Alexander Udalov 9309570752 Fix serialization of type parameters inner generic class
The call to `createTopLevel` instead of `create` (which creates
serializers for outer classes properly, with correct type parameter
contexts) caused MetadataSerializer to write type parameter metadata
incorrectly.  For example, in the following case:

    class A<E> {
        inner class B<T, E> { ... }
    }

A's type parameter E would get id 0, and B's type parameters T and E
would get ids 0 and 1. This is a problem because ids are supposed to be
unique for each class including its outer classes, and deserializer,
decompiler and stub builder rely on this assumption.

JVM metadata is unaffected because `create` is called correctly there,
see MemberCodegen#generateKotlinClassMetadataAnnotation

 #KT-24944 Fixed
2018-06-21 14:45:45 +02:00
Mikhail Zarechenskiy c05285a23c Remove unneeded bunch file for TargetPlatform.kt
- added missing call checkers
 - fixed missing dependency for `KotlinCallComponents`

 #KT-25018 Fixed
2018-06-21 13:52:10 +03:00
Mikhail Zarechenskiy 6c06d441e5 Fix description of error type 2018-06-21 13:49:37 +03:00
Dmitry Savvinov 70714cb71e Deprecate smartcasts on local delegated properties
^KT-22517 Fixed
2018-06-21 13:36:43 +03:00
Dmitry Savvinov 31ce992ff2 Take DataFlowValueFactoryImpl from DI container instead of constructing directly 2018-06-21 13:36:43 +03:00
Dmitry Savvinov fa72198505 Minor: narrow deprecation scope of DataFlowValueFactoryImpl to constructor 2018-06-21 13:36:43 +03:00
Dmitry Savvinov 8964b2c7a4 Minor: escape colon properly in interalArgWrongPrefix.args 2018-06-21 13:36:11 +03:00
Anton Bannykh 6edf138460 JS IR: muted newly failing tests 2018-06-21 13:27:17 +03:00
Anton Bannykh 04a2ffc0c1 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Anton Bannykh 6df9919eba JS IR: add DefaultContructorMarker to the runtime 2018-06-21 13:27:17 +03:00
Anton Bannykh 9039b75c25 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Anton Bannykh c077b3ca5d JS IR: invoke missing lowering step for default arguments lowering 2018-06-21 13:27:17 +03:00
Dmitry Petrov d546fca876 Enable JS_IR back-end on passing 'when' tests 2018-06-21 12:32:00 +03:00
Dmitry Petrov 8999e5bfe6 psi2ir: support unsigned integer literals
NB in FE unsigned integer constants are now represented using signed
integer types (e.g., UInt constant actually holds an Int value).
So, in IR so far we also represent unsigned constant literals as
constant values of corresponding signed types, but with corresponding
unsigned type:
0xFFFF_FFFFu becomes 'CONST Int type=kotlin.UInt value=-1'
2018-06-21 12:32:00 +03:00
Mikhael Bogdanov c444db90fb Basic support of source mapping in inliner 2018-06-21 11:18:41 +02:00
Mikhael Bogdanov 83ab2b1d34 Minor. Code clean 2018-06-21 11:18:40 +02:00
Mikhael Bogdanov 7c615eb7ab Minor. Reformat 2018-06-21 11:18:40 +02:00
Mikhael Bogdanov 3dff3d61f5 Skip generic signature in bridges 2018-06-21 11:18:39 +02:00
Mikhael Bogdanov 0f7dc6e8af Fix IMPLICIT_COERCION_TO_UNIT 2018-06-21 11:18:38 +02:00
Mikhael Bogdanov ede751c074 Support more cases in special bridge lowering 2018-06-21 11:18:37 +02:00
Mikhael Bogdanov 64835c1c9c Generate synthetic instructions in loops to support non standart stack transformation 2018-06-21 11:18:37 +02:00
Mikhael Bogdanov f6038aafcc Fix IMPLICIT_NOT_NULL coercion 2018-06-21 11:18:36 +02:00
Mikhael Bogdanov a4308e983a Set proper parent for lowered local declaration 2018-06-21 11:18:35 +02:00
Mikhael Bogdanov c588d22e6a Don't sort descriptors in DeclarationStubGenerator
Sorting adds 30% time to test execution
2018-06-21 11:18:35 +02:00
Alexey Tsvetkov 32b1c42647 Specify root type in non-existent location warning 2018-06-20 23:58:37 +03:00
Alexey Tsvetkov 3fb26d92df Filter out non-existent java source roots in kapt tasks
#KT-24716 fixed
2018-06-20 23:58:37 +03:00
Denis Zharkov 5c04a302fa Add additional checks for RestrictsSuspension-marked functions
Namely, check that when one calls a restricted function
the reciever used for that calls is obtained exactly from the enclosing
suspend function

 #KT-24859 Fixed
2018-06-20 20:00:10 +03:00
Nikolay Krasko 35fdfc9f05 Fix running inner classes from console
#KT-24961 Fixed
2018-06-20 19:52:33 +03:00
Juan Chen cd91cffdeb as32: Fine-tune exception handling in GooglePluginUpdateVerifier 2018-06-20 19:47:56 +03:00
Nikolay Krasko bf890b46f3 Allow to leave decline reason empty but demand verifier name 2018-06-20 19:47:55 +03:00
Juan Chen 855c0a353c as32: Improve plugin update verification messages 2018-06-20 19:47:55 +03:00
Juan Chen 6523d4e306 as32: Implementation for GooglePluginUpdateVerifier 2018-06-20 19:47:55 +03:00
Nikolay Krasko 34111e8944 Prototype verify extension and apply it for Kotlin updater in AS 3.2 2018-06-20 19:47:55 +03:00
Dmitry Petrov 871dacbf6c Minor: generated tests update 2018-06-20 17:34:05 +03:00
Mikhail Glukhikh e1d223937b Optimize "replace toString() with string template"
Related to KT-13782
2018-06-20 17:18:18 +03:00
Mikhail Glukhikh 7a1cf5704e MPP wizard: use more clear wording (KT-20554) 2018-06-20 17:18:18 +03:00
Mikhail Glukhikh 152327d69d Fix erroneous full resolve cache filling
Before this commit, we could store partial resolve results in full
resolve cache (for some declarations, e.g. primary constructors).
This may be done iff current partial resolve mode provides all results
from full resolve mode (CFA results & diagnostics).
Otherwise we should not do it.

This fixes four quick-fix tests on CreateTypeParameter
So #KT-23860 Fixed
So #KT-22758 Fixed
2018-06-20 17:18:18 +03:00
Mikhail Glukhikh 40668e3f96 Partial cleanup of ResolveElementCache 2018-06-20 17:18:18 +03:00
Toshiaki Kameyama 096f9fefd1 "Remove redundant '.let' call" intention: handle it inside function call
So #KT-20583 Fixed
2018-06-20 17:18:17 +03:00
Toshiaki Kameyama d4798b699f Reformat: ReplaceSingleLineLetIntention 2018-06-20 17:18:17 +03:00
kenji tomita 817d75a47f Introduce ReplaceToStringWithStringTemplateInspection #KT-13782 Fixed 2018-06-20 17:18:17 +03:00
Dmitry Petrov f956e8d85d Record special descriptor in REFERENCE_TARGET for type alias object
If a type alias is used to reference an object (companion object) as a
qualifier, record FakeCallableDescriptorForTypeAliasObject in
REFERENCE_TARGET. This tells IDE that type alias was used in the file,
thus, if it's imported, such import isn't redundant.
REFERENCE_TARGET is used mostly by IDE and by ClassifierUsageChecker,
which we also have to update to handle qualifiers with
FakeCallableDescriptorForTypeAliasObject in REFERENCE_TARGET.

Rewrite some parts of ClassifierUsageChecker for cleaner interaction.

 #KT-21863 Fixed Target versions 1.2.40
2018-06-20 17:16:25 +03:00
Dmitry Petrov 3b3cc5233f Minor: reformat code 2018-06-20 17:16:25 +03:00