Commit Graph

30703 Commits

Author SHA1 Message Date
Svetlana Isakova 4c30bcfca0 Added separate notes for name resolution motivation
Addressed some comments on the main article
2016-03-31 13:23:55 +03:00
Mikhail Glukhikh 56ef98ee29 Refactoring: DeclarationsChecker checkClassOrObjectMembers / checkFunction 2016-03-31 12:19:15 +03:00
Mikhail Glukhikh 8c131f4790 KT-11666: Implicit nothing is allowed for overridden function / properties 2016-03-31 12:00:22 +03:00
Mikhail Glukhikh 4c03aaabd4 Implicit nothing / intersection types are now checked also for member functions #KT-11666 Fixed 2016-03-31 11:59:17 +03:00
Alexander Udalov 0ea3b4ade4 Fix multiple resource leaks by closing InputStream instances
The main fix is in BuiltInsPackageFragment, the rest is the improvement of
other usages of getResourceAsStream

 #KT-11433 Fixed
2016-03-30 21:41:43 +03:00
Alexander Udalov 8316953259 Fix double quotes in diagnostic messages
For diagnostics without any parameters, the given text is simply rendered as a
String, so no symbols should be escaped.

For diagnostics with parameters, the format in java.text.MessageFormat is used,
so one single quote is erased and two single quotes become one single quote in
the rendered text.
2016-03-30 21:41:43 +03:00
Pavel V. Talanov 484167e9d9 KtLightModifierList* is created only for light classes build for sources
This is a hacky solution to avoid calling lightMemberOrigin.originalElement inside
Moreover it needs to resolve descriptor for sources inside computeAnnotations and it is used only for kotlin sources so this will have to do for now
2016-03-30 21:35:24 +03:00
Pavel V. Talanov e19cc04c63 KT-11678 Support navigation from Java source to Kotlin binaries
Introduce LightMemberOriginForCompiledElement which holds logic for finding corresponding decompiled declaration
ByJvmSignatureIndexer stores the required information while building decompiled text

Some are unsolved in this commit:
   - constructors
   - @Jvm* and other unregular generated members
   - annotation methods

 #KT-11678 Fixed
2016-03-30 21:35:23 +03:00
Pavel V. Talanov f9fa365059 LightElements: avoid computation of LightMemberOrigin.originalElement on common api calls 2016-03-30 21:35:23 +03:00
Pavel V. Talanov f40a04c5a2 Refactor light elements
KtLightElement#delegate -> clsDelegate, KtLightElement#origin -> kotlinOrigin and make them properties
KtLightClassForDecompiledDeclaration stores KtClsFile
KtLightField stores LightMemberOrigin
2016-03-30 21:35:22 +03:00
Pavel V. Talanov 02543295f9 Refactor: Make LightMemberOrigin an interface, extract one implementation 2016-03-30 21:35:21 +03:00
Pavel V. Talanov 3977508c2c Improve AbstractReferenceResolveTest 2016-03-30 21:35:20 +03:00
Pavel V. Talanov 4824d4b880 Refactor: abstract over decompiled text indexing
Move navigation-related code from KtDecompiledFile
2016-03-30 21:35:19 +03:00
Pavel V. Talanov ef25b14eab Drop non-generated NavigateToDecompiledLibraryTest
It relies on internal data structure
2016-03-30 21:35:19 +03:00
Pavel V. Talanov 68c0bb9dc2 Generate navigateToDecompiledLibraryTest from the same test data as navigateToLibrarySourceTest
Change test data format
2016-03-30 21:35:18 +03:00
Pavel V. Talanov f74e8ee7f8 Generate tests for resolving references to kotlin binaries from java in IDE 2016-03-30 21:35:17 +03:00
Ilya Gorbunov ab68b49a70 Introduce RandomAccess to JS.
Make EmptyList support RandomAccess.
#KT-10794
2016-03-30 21:06:18 +03:00
Ilya Gorbunov 6ba98f7fe6 Binary compatibility validator: filter out empty facades *after* members are flattened from non-public part superclasses.
Use stable member sort order for members flattened from non-public superclasses, rewrite test to make order matter.
2016-03-30 20:44:44 +03:00
Svetlana Isakova 8e7f259beb Added an article describing name resolution 2016-03-30 19:34:54 +03:00
Mikhail Glukhikh b7e8f71367 Fix of getCorrespondingLoop for complex loop / try-finally trees #KT-8246 Fixed 2016-03-30 18:49:23 +03:00
Alexander Udalov f385c85672 Rename Changelog.md -> ChangeLog.md 2016-03-30 18:29:17 +03:00
Nikolay Krasko 193f5e9720 Find problem test in injection 2016-03-30 16:42:37 +03:00
Nikolay Krasko b4f5f0e10e Add initial support for injecting languages with comment or annotation
#KT-11472 Fixed
2016-03-30 16:42:37 +03:00
Nikolay Krasko 4819c07c95 Extract function for adding annotation to KtModifierListOwner 2016-03-30 16:42:37 +03:00
Valentin Kipyatkov 97311b56fe Minor changes on code review 2016-03-30 15:58:09 +03:00
Valentin Kipyatkov 99c232df84 Checking that no quickfix reference KotlinType 2016-03-30 15:58:09 +03:00
Valentin Kipyatkov 2ac627efd3 No KotlinType reference in ConvertClassToKClassFix 2016-03-30 15:58:09 +03:00
Valentin Kipyatkov 40e69318b8 Renames + parameter to receiver 2016-03-30 15:58:08 +03:00
Valentin Kipyatkov 1f39511950 No i18n 2016-03-30 15:58:08 +03:00
Valentin Kipyatkov 9e5bbc5ef4 No KotlinType reference in ChangeParameterTypeFix 2016-03-30 15:58:08 +03:00
Valentin Kipyatkov d8993069c0 Do not rely on KotlinType.toString() 2016-03-30 15:58:08 +03:00
Valentin Kipyatkov 1754b58e37 No KotlinType reference in AddArrayOfTypeFix 2016-03-30 15:58:08 +03:00
Valentin Kipyatkov 3905344530 No KotlinType reference in NumberConversionFix 2016-03-30 15:58:07 +03:00
Valentin Kipyatkov 3ad292697a No KotlinType reference in ChangeFunctionLiteralReturnTypeFix 2016-03-30 15:58:07 +03:00
Valentin Kipyatkov 9bbeaa3c03 Minor code improvements 2016-03-30 15:58:07 +03:00
Valentin Kipyatkov 74f9f89728 Converting to Kotlin (step 2) 2016-03-30 15:58:07 +03:00
Valentin Kipyatkov f18db1f88e Converting to Kotlin (step 1) 2016-03-30 15:58:07 +03:00
Valentin Kipyatkov e00e94e8c6 No KotlinType reference in CastExpressionFix 2016-03-30 15:58:06 +03:00
Valentin Kipyatkov 3467ac7438 No KotlinType reference in ChangeFunctionReturnTypeFix 2016-03-30 15:58:06 +03:00
Valentin Kipyatkov 41c09700e8 Minor code improvements 2016-03-30 15:58:06 +03:00
Valentin Kipyatkov e0ba2e8395 Converting to Kotlin (step 2) 2016-03-30 15:58:06 +03:00
Valentin Kipyatkov 6afd88bf07 Converting to Kotlin (step 1) 2016-03-30 15:58:06 +03:00
Valentin Kipyatkov 54a69bf21d ChangeVariableTypeFix to not hold KotlinType 2016-03-30 15:58:05 +03:00
Valentin Kipyatkov d5a8d8c393 Functions to objects 2016-03-30 15:58:05 +03:00
Valentin Kipyatkov 3f022377f3 Minor code improvements 2016-03-30 15:58:05 +03:00
Valentin Kipyatkov eb918db3af Converting to Kotlin (step 2) 2016-03-30 15:58:05 +03:00
Valentin Kipyatkov 9c18409966 Converting to Kotlin (step 1) 2016-03-30 15:58:05 +03:00
Valentin Kipyatkov 1f0679e103 Converting to Kotlin (step 2) 2016-03-30 15:58:04 +03:00
Valentin Kipyatkov 2ffde5db43 Converting to Kotlin (step 1) 2016-03-30 15:58:04 +03:00
Valentin Kipyatkov 210626a6e1 Merged code into one visitor 2016-03-30 15:58:04 +03:00