Commit Graph

32583 Commits

Author SHA1 Message Date
Denis Zharkov 36a7f31358 Minor. Extract parsePropertyDelegateOrAssignment 2016-07-08 16:06:47 +03:00
Denis Zharkov 4981b730ef Minor. Cleanup KotlinParsing
- Remove unused field and commented code
- Add some comments
- jet -> kotlin
2016-07-08 16:06:47 +03:00
Denis Zharkov bed6e312ae Minor. Drop unreachable conditional branch
- allowShortAnnotations is true only for IN_ANNOTATION_LIST
- when starting parsing of annotation list we can't come to modifier list
(see the only usage of IN_ANNOTATION_LIST)
2016-07-08 16:06:47 +03:00
Denis Zharkov 46f11a5ec4 Add val/var tokens in parameter name recovery set
Recovery after val/var everywhere beside value parameters works
properly without this change

 #KT-7915 Fixed
2016-07-08 16:06:47 +03:00
Dmitry Petrov b0edec8449 KT-13023 Char operations throw ClassCastException for boxed Chars
Char is not a Number, so we can't use the same coercion strategy for Char members,
since it doesn't work for boxed Chars.
2016-07-08 10:26:04 +03:00
Dmitry Petrov 2ccb0caa6c Minor: fix NPE in CallableMethod.toString for methods of primitive types 2016-07-08 10:26:04 +03:00
Dmitry Jemerov dec2f982ee add test for resolving links to library classes from KDoc comments 2016-07-07 19:28:59 +02:00
Dmitry Jemerov 80e10c6928 use navigation element to resolve KDoc links, so that we have correct context when resolving links in the documentation of library elements
#KT-10654 Fixed
2016-07-07 19:28:31 +02:00
Dmitry Jemerov fac1b85d26 use a better API for locating target element when navigating by documentation link, to ensure we find the source for descriptors belonging to library classes
#KT-12932 Fixed
2016-07-07 19:27:53 +02:00
Dmitry Jemerov 88fe6680fa use QualifiedNameResolver for resolving links in KDoc
#KT-10398 Fixed
2016-07-07 19:27:45 +02:00
Dmitry Jemerov 60523fb93f avoid NPE when trying to create a file that already exists
#KT-12655 FIxed
2016-07-07 18:01:43 +02:00
Dmitry Jemerov 972ebd5fec check that main() returns Unit
#KT-12760 Fixed
2016-07-07 18:01:42 +02:00
Dmitry Jemerov 30d721c458 MainFunctionDetector: cleanup after J2K 2016-07-07 18:01:41 +02:00
Dmitry Jemerov b58c659e46 MainFunctionDetector: J2K 2016-07-07 18:01:40 +02:00
Dmitry Jemerov b9a9f2504d MainFunctionDetector: rename to .kt 2016-07-07 18:01:40 +02:00
Dmitry Jemerov 193a404c07 to restore pre-1.0.3 highlighting behavior, inherit "extension function" and "extension property" colors from "static method" and "static field"
#KT-12937 Fixed
2016-07-07 18:01:39 +02:00
Dmitry Jemerov 216d548e98 fix rendering of code blocks escaped with multiple backticks or containing backslashes
#KT-12998 Fixed
 #KT-12999 Fixed
2016-07-07 18:01:38 +02:00
Dmitry Jemerov 801a128547 don't lose ! when rendering markdown
#KT-13000 Fixed
2016-07-07 18:01:37 +02:00
Alexey Tsvetkov 621ffca194 Do not run integration tests with old gradle versions
Reason finalizedBy is not supported with gradle < 2.0
2016-07-07 15:42:01 +03:00
Alexander Udalov 720c29e8f4 Minor, fix NonExistentClass name and format 2016-07-07 13:56:01 +03:00
Alexander Udalov ceb54492e6 Get rid of CallChecker#checkPropertyCall, create fake ResolvedCall 2016-07-07 13:55:48 +03:00
Dmitry Jemerov 623673c3df fix ASM 5 src download URL (file was removed in IDEA commit ed9c9fc) 2016-07-07 12:49:00 +02:00
Nikolay Krasko 54da3e73c0 Add description for Kotlin gradle plugin 2016-07-07 02:54:38 +03:00
Nikolay Krasko c051bd2d2c Refactoring: better name for SameVersionInspection
It now has better suppression string
2016-07-07 02:54:37 +03:00
Nikolay Krasko 8450921b58 Refactoring: rename SameVersionIDEPluginInspection
It now has better suppression string
2016-07-07 02:54:36 +03:00
Nikolay Krasko 16b8f3fd57 Show versions that are reported different in SameVersionIDEPluginInspection 2016-07-07 02:54:28 +03:00
Nikolay Krasko 5cfebe4120 Avoid "loader constraint violation: when resolving method "ActionsKt.runReadAction()" 2016-07-07 02:51:26 +03:00
Nikolay Krasko 9f0e8ca6b0 Read test files with \r removed on Windows 2016-07-07 02:51:26 +03:00
Nikolay Krasko 2783c9bde2 Fix AbstractAnnotationProcessorBoxTest on Windows: load text without \r 2016-07-07 02:51:25 +03:00
Nikolay Krasko dcfb5f1554 Minor: mark folder as resources not a source root 2016-07-07 02:51:24 +03:00
Alexey Tsvetkov 03b4eba4ef Remove dependency on Files from guava 2016-07-06 16:39:08 +03:00
Alexey Tsvetkov 16b1616ebc Gradle: copy kotlin classes after java compilation
#KT-9392 fixed
    #KT-12295 fixed
    #KT-12736 fixed
2016-07-06 16:38:48 +03:00
Denis Zharkov 3a59e1d222 Support suspending extension functions 2016-07-06 15:25:19 +03:00
Denis Zharkov 2cc09f928e Allow suspend extensions for specially annotated controllers 2016-07-06 15:25:19 +03:00
Denis Zharkov 30b4dfa65d Minor. Make extension's receiver to be a type parameter and simplify usage 2016-07-06 15:25:19 +03:00
Dmitry Petrov 3445fe0d30 KT-12985 Do not create range instances for 'for' loop in CharSequence.indices 2016-07-06 12:50:41 +03:00
Dmitry Petrov 3dc23a0e02 KT-12983 java.lang.VerifyError: Bad type on operand stack in arraylength
Use proper receiver value type.
2016-07-06 09:59:00 +03:00
Michael Bogdanov 6b8e8cee17 Fix for KT-12891: Allow to omit type in local delegated property declaration
#KT-12891 Fixed
2016-07-05 21:22:48 +03:00
Alexander Udalov 191dfa1f2b Minor, add test that language feature settings are used in local analysis
This test checks that the correct LanguageFeatureSettings instance (not
LanguageVersion.LATEST) is being passed to
createContainerForLazyLocalClassifierAnalyzer
2016-07-05 19:54:16 +03:00
Alexander Udalov b557f9e712 Fix typo in inline property diagnostic message 2016-07-05 19:25:24 +03:00
Alexander Udalov d331b6ae8e Minor, move isInfixCall implementation out of InfixCallChecker 2016-07-05 19:23:21 +03:00
Alexander Udalov 9bf91e95d0 Change default visibility for TypeAlias from 'internal' to 'public'
Since public type aliases will supposedly be more common than internal ones, it
makes sense to save on writing flags for the former rather than the latter
2016-07-05 18:18:45 +03:00
Alexander Udalov a48e1680e9 Minor, fix typo in KParameter#isOptional kdoc 2016-07-05 18:18:44 +03:00
Alexander Udalov 3b349e9be0 Fix reflection on reference to generic property
See a93484b457 for the similar fix to function
references

 #KT-12967 Fixed
2016-07-05 18:18:43 +03:00
Alexander Udalov 48fe9fb2c0 Fix AssertionError in OverrideResolver on bad hierarchy
Previously the code was operating under the assumption that if the
implementation of some function (both the implementation and the function come
from supertypes) does not have a proper return type (the one which is a subtype
of return type of all declarations of this function in the supertypes), then
there's necessarily at least one abstract declaration of the function, such
that the implementation's return type is not a subtype of the return type of
that declaration. The assertion makes sense when the hierarchy above the
current class does not have any errors: we should report at least one function
as being "not implemented" in the current class.

However, as demonstrated by the test case, if there's an error already in the
supertypes with regard to overridability of members, this assertion may be
wrong. Reporting the "not implemented" error in such case is in fact not
necessary because of the already existing error ("return type mismatch" in the
test) in the supertypes

 #KT-12482 Fixed
2016-07-05 18:18:43 +03:00
Alexander Udalov a533f8597d Fix debug names for some slices
Also move RUNTIME_ASSERTION_INFO and LOAD_FROM_JAVA_SIGNATURE_ERRORS to a
single class for simplicity
2016-07-05 18:18:26 +03:00
Denis Zharkov a420fda825 Fix problem with missing handleResult call
At first we try to resolve 'handleResult' just as last expression
in a lambda is first argument, then if results are unsuccessful
try resolve 'handleResult' with fake Unit expression

 #KT-12969 Fixed
2016-07-05 15:36:06 +03:00
Denis Zharkov 888db4b3b5 Make 'controller' field package-private
To make it accessible from nested lambdas

 #KT-12974 Fixed
2016-07-05 15:36:06 +03:00
Denis Zharkov d657bc8110 Treat any coroutine as it has non-const closure
Because it's always does capture controller
2016-07-05 15:36:06 +03:00
Denis Zharkov df4bf61378 Refine types returned by OptimizationBasicInterpreter.newValue
#KT-12958 Fixed
2016-07-05 15:36:06 +03:00