Commit Graph

4559 Commits

Author SHA1 Message Date
Yan Zhulanow 6752df189d Make infix modifier diagnostic message more informative (KT-12589)
(cherry picked from commit 2744309)
2016-06-24 15:10:19 +03:00
Stanislav Erokhin 7c2825b397 KT-12623 Fixed ISE: Type parameter ... not found for public fun ...
#KT-12623 Fixed
Also EA-72653 fixed.
2016-06-23 02:03:24 +03:00
Stanislav Erokhin ad285d5ca2 KT-11679 Fixed exception at ResolvedCallImpl.getArgumentMapping()
#KT-11679 Fixed
Also fixed EA-75913 EA-78908
2016-06-22 19:42:09 +03:00
Mikhail Glukhikh bd8c7577e1 Replace explicit parameter with it : correct handling of it from outer lambda #KT-12437 Fixed
(cherry picked from commit cb8fe96)
2016-06-21 22:24:54 +03:00
Mikhail Glukhikh b44c94a887 Fix for EA-81477 : correct handling of a property without initializer (but with e.g. getter)
(cherry picked from commit 4e2d35a)
2016-06-21 22:24:44 +03:00
Mikhail Glukhikh 5b328e9042 Can be parameter inspection: delete only particular modifiers (e.g. no vararg) #KT-12768 Fixed
(cherry picked from commit d4116b5)
2016-06-21 22:24:27 +03:00
Mikhail Glukhikh 4abcc278fd Can be constructor property: comment saver introduced to retain comments; unbound comments now added before, not after
(cherry picked from commit 886cf21)
2016-06-21 22:23:23 +03:00
Mikhail Glukhikh 4145e3438f Minor fixes: can be constructor property
(cherry picked from commit 4d44e15)
2016-06-21 22:23:12 +03:00
Nikolay Krasko f8196d8331 Add space after a semicolon only if there's another child at the same line 2016-06-21 21:54:50 +03:00
Kirill Rakhman b560aab06d Format spaces before enum arguments
Fixes #KT-12714
2016-06-21 21:54:50 +03:00
Kirill Rakhman a520be5509 Format spaces around semicolon
Fixes #KT-12689
2016-06-21 21:54:50 +03:00
Kirill Rakhman db387bd573 Format spaces after annotation in annotated expression
Fixes #KT-12781
2016-06-21 21:54:50 +03:00
Kirill Rakhman ae83330679 Format spaces inside curly braces in string template
Fixes #KT-12791
2016-06-21 21:54:50 +03:00
Kirill Rakhman 655fc45a87 Format spaces around in keyword
Fixes: KT-10680
2016-06-21 21:54:50 +03:00
Mikhail Glukhikh 70becfbd86 Has platform type inspection is now intention-based
(cherry picked from commit 7cc6b9b)
2016-06-21 15:22:15 +03:00
Mikhail Glukhikh 5c4b6ba8b0 Has platform type : public API only option
(cherry picked from commit a084c1d)
2016-06-21 15:20:11 +03:00
Kirill 86b70ba995 Add quickfix tests for HasPlatformTypeInspection
(cherry picked from commit af1b26b)
2016-06-21 15:20:00 +03:00
Kirill Rakhman d7bf03be46 Implement inspection for declarations with implicit platform types #KT-12310 Fixed
(cherry picked from commit 00d8c26)
2016-06-21 15:19:13 +03:00
Pavel V. Talanov bafe8e55ce Create SyntheticMemberDescriptor interface
Implement this interface by sam adapters/constructors and use it in navigation

 #KT-11708 Fixed
2016-06-20 20:15:34 +03:00
Nikolay Krasko 4087e650aa Wrong delegation to delegation property in debugger when property defined in another module (KT-12678)
Different bytecode can be generated for delegated property and for non-delegated one. Backend inspects DELEGATED_PROPERTY_CALL to understand the property type, and expects that
this information had been already recorded into context. Frontend writes DELEGATED_PROPERTY_CALL into context during body resolve or type inference if type is not present.

Either way in debugger context it may happen that the DELEGATED_PROPERTY_CALL won't be written into context.

 #KT-12678
2016-06-20 16:22:04 +03:00
Denis Zharkov 72eb87f5d0 Support inline suspend functions
A lot of additional work was required to support them:
- Suspension points are being identified by two markers
  instead of one pointing to suspend function call
- Approach with replacing return type of suspend function does not work anymore.
  So we decode suspension return type as an argument for begin marker
- It became necessary to perform variables liveness analysis
  (see comment in org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitor.spillVariables)
2016-06-19 12:50:54 +03:00
Valentin Kipyatkov 1b16ff6c82 KT-11975 Invert if-condition intention does not simplify "is" expresssion
#KT-11975 Fixed
2016-06-17 18:09:07 +03:00
Mikhail Glukhikh ac03d98cb2 Inspection "can be primary constructor property" with relevant quick-fix #KT-8477 Fixed
(cherry picked from commit 2db7562)
2016-06-16 16:24:43 +03:00
Mikhail Glukhikh b1734920b6 Surround with null check : applicable also for TYPE_MISMATCH 2016-06-13 15:56:41 +03:00
Mikhail Glukhikh 954952ae71 Surround with null check : apply for ITERATOR_ON_NULLABLE 2016-06-13 15:34:15 +03:00
Mikhail Glukhikh 230f73acc9 KT-11104 extra : name validator introduced for wrap with safe let call 2016-06-13 15:34:04 +03:00
Mikhail Glukhikh 3c49b5f342 KT-11104 extra : "wrap with safe let call" is now applicable for argument type mismatches 2016-06-13 15:33:59 +03:00
Mikhail Glukhikh 47c1106d5d Quick-fix "wrap with safe let call" introduced #KT-11104 Fixed 2016-06-13 15:33:53 +03:00
Mikhail Glukhikh 90342ea33b KT-11104 : quick fix "surround with null check" 2016-06-13 15:33:36 +03:00
Stanislav Erokhin 03241419bd Minor. removed several tests with error calls. 2016-06-10 21:28:04 +03:00
Mikhail Glukhikh 9470308fe7 If to when: more accurate comment handling #KT-12649 Fixed 2016-06-09 20:00:14 +03:00
Denis Zharkov d2bf4cbfa0 Fix reference resolution on suspension calls 2016-06-09 17:57:15 +03:00
Denis Zharkov b8d4d39f4d Add custom applicability checks for suspend/coroutine modifiers 2016-06-08 18:53:16 +03:00
Denis Zharkov 3ede8f97e6 Revert "Quick fix for deprecated async syntax"
This reverts commit afc1e24571.
2016-06-08 18:53:16 +03:00
Denis Zharkov 7d3333e86e Revert "Reserve "async* {}", extend the quick-fix"
This reverts commit a7e7d53e2b.
2016-06-08 18:53:16 +03:00
Denis Zharkov 329fb9d619 Introduce 'coroutine'/'suspend' modifiers 2016-06-08 18:53:16 +03:00
Kirill Rakhman 5c68681f96 Formatter: handle spaces before value arguments list (KT-12634)
#KT-12634 Fixed
2016-06-07 19:11:28 +03:00
Dmitry Jemerov 060c285715 search for Kotlin convention usages of Java methods
#KT-5960 Fixed
2016-06-07 14:50:16 +02:00
Dmitry Jemerov 7e2ce2d4e0 when finding usages of parameter of annotation class primary constructor, search also for light method generated from that parameter
#KT-9399 Fixed
2016-06-07 14:50:09 +02:00
Alexander Udalov d8db769823 Use empty list instead of ThrowingList in callable reference resolution
Clients of the call resolution do not expect to see a throwing list in call's
arguments, and it's wrong to make each of them check against the special case
that is the resolution of callable references

Fixes EA-69901
2016-06-07 12:42:45 +03:00
Alexey Sedunov fe01035e3c Rename: Do not rename ambiguous references in import directives
#KT-6363 Fixed
2016-06-06 21:29:23 +03:00
Alexey Sedunov 188531017a Rename: Implement automatic renamer for test classes
#KT-8512 Fixed
2016-06-06 21:29:11 +03:00
Alexey Sedunov 42b71ae90c Rename: Do not show 'Rename overloads' options if target function has no
overloads. Consider extensions and members overloads if they have the same
recever class
 #KT-8541 Fixed
 #KT-8786 Fixed
2016-06-06 21:29:07 +03:00
Dmitry Petrov 9e7222906d Generate (possibly empty) file classes for files with type aliases. 2016-06-06 13:50:37 +03:00
Dmitry Petrov 3500f5a96b Type alias: resolve type alias RHS during force-resolve. 2016-06-03 16:07:20 +03:00
Mikhail Glukhikh de3fbe38f1 KT-12152: quick fix "make final" for member / containing class 2016-06-03 14:46:07 +03:00
Mikhail Glukhikh a22e7d3bcf KT-12152 : leaking this inspection: accessing non-final member / this in non-final class 2016-06-03 14:45:58 +03:00
Alexey Sedunov d27f3c0189 Rename: Do not replace Java references to synthetic component functions when renaming constructor parameter
#KT-9241 Fixed
2016-06-02 15:28:31 +03:00
Alexey Sedunov 96132fa61a Rename: @JvmName support
#KT-8044 Fixed
 #KT-9432 Fixed
2016-06-02 15:28:27 +03:00
Alexey Sedunov ff4c16d342 Rename: Allow renaming class by constructor delegation call referencing primary constructor
#KT-8860 Fixed
2016-06-02 15:28:22 +03:00