Commit Graph

30719 Commits

Author SHA1 Message Date
Nikolay Krasko bbd6417d3c Add plugin-api dependency of android-extension-compiler to plugin classpath
Add it to kotlin-plugin.jar but not to kotlin-android-extensions-plugin.jar because frontend depends on the module plugin-api too.
2016-03-31 16:07:22 +03:00
Nikolay Krasko c0481ca598 Move injection to optional dependency 2016-03-31 16:07:22 +03:00
Pavel V. Talanov 7de171efda Improve message clarity for WRONG_NUMBER_OF_TYPE_ARGUMENTS diagnostics
#KT-9887 Fixed
2016-03-31 16:06:48 +03:00
Alexey Tsvetkov d6cd46e079 Build non-incrementally when input class-file is changed 2016-03-31 15:08:14 +03:00
Denis Zharkov 1511a03027 Fix SAM adapters substitution
Approximate sourceFunction types if it's needed

 #KT-11696 Fixed
2016-03-31 14:52:12 +03:00
Denis Zharkov bc1b34a989 Add additional visibility check for synthetic extensions
Use extension receiver as dispatch one, because it is effectively dispatch
(after some desugaring)
2016-03-31 14:51:57 +03:00
Denis Zharkov b5c9523e4b Minor. Adjust JS test to protected visibility changes 2016-03-31 14:51:57 +03:00
Denis Zharkov 1bc45fb9cf Adjust J2K to latest protected visibility fixes 2016-03-31 14:51:57 +03:00
Denis Zharkov 92be4aee9c Prohibit protected constructor calls that are not super-calls in subtypes
#KT-11649 Fixed
2016-03-31 14:51:57 +03:00
Denis Zharkov 816f14a927 Minor. Covariantly override ClassDescriptor.original 2016-03-31 14:51:57 +03:00
Denis Zharkov 5056c43975 Do not check receiver for protected constructor calls
Checks for protected constructors should be performed manually,
because they are rather complex
2016-03-31 14:51:57 +03:00
Denis Zharkov 5bf336474d Respect receiver-dependent visibility when selecting smart-cast type 2016-03-31 14:51:57 +03:00
Denis Zharkov d3b7eb81fa Make PositioningStrategy.mark public
Because it's used with receivers of types different from call site ones.
2016-03-31 14:51:57 +03:00
Denis Zharkov 935355ad2f Refine isVisible for protected visibility
#KT-7437 Fixed
 #KT-7971 Fixed
 #KT-7051 Fixed
 #KT-6125 Fixed
 #KT-6186 Fixed
2016-03-31 14:51:57 +03:00
Denis Zharkov 182b349492 Clarify Visibility.isVisible contract for null as receiverValue
See comment
2016-03-31 14:51:57 +03:00
Mikhail Glukhikh 60511f010a Build fix: evaluationErrors.repl 2016-03-31 14:34:56 +03:00
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