Dmitriy Novozhilov
eed5b3f1d1
Add quickfix for removing redundant spread operator
...
#KT-25306 Fixed
2019-12-19 10:22:45 +03:00
Alexander Udalov
16db3a8b5f
Fix compiler and IDE tests on Experimental/RequiresOptIn
...
See cdbabf224f , e009c7064e
2019-12-18 14:09:06 +01:00
Toshiaki Kameyama
8857827dce
"Add not-null asserted (!!) call": do not add this when implicit receiver is not extension receiver
...
#KT-34894 Fixed
2019-12-17 11:15:53 +03:00
Toshiaki Kameyama
f1c605d0f7
AddFunctionParametersFix: improve parameter name for 'it' argument
...
#KT-33297 Fixed
2019-12-17 11:10:15 +03:00
Toshiaki Kameyama
23749bdde7
Add constructor parameter: add generic types correctly
...
#KT-34203 Fixed
2019-12-17 11:00:51 +03:00
Victor Petukhov
07269661b4
NI: Allow to resolve to functions with SAM conversion and passing array without spread as vararg (with warning)
...
^KT-35224 Fixed
2019-12-12 23:46:16 +03:00
Toshiaki Kameyama
12f17a6724
"Add constructor parameters" quick fix should add default parameters from super class ( #2869 )
...
#KT-33109 Fixed
2019-12-10 13:09:31 +01:00
Nikolay Krasko
c12599a045
Fix test data for testParamTypeLambdaMismatch in >= 192
2019-12-02 13:29:36 +03:00
Dmitry Gridin
37371edb8c
Auto-import: add quickfix for overloaded generic function
...
#KT-34667 Fixed
2019-11-29 21:09:24 +07:00
Dmitry Gridin
4b98430058
Formatter: fix line break after package & file annotation
...
#KT-23957 Fixed
2019-11-29 21:09:04 +07:00
Nikolay Krasko
35fec9e9db
Fix withJava test after resorting annotation targets
...
Was broken after eb71e68 .
2019-11-28 12:02:00 +03:00
Nikolay Krasko
eb71e686da
Stable order of generated annotation targets
...
A random order of usages is enabled in 193 platform that makes tests flaky without the commit.
2019-11-27 12:26:54 +03:00
Toshiaki Kameyama
f6059c3eb5
"Change to var": remove const modifier
...
#KT-35022 Fixed
2019-11-23 01:17:38 +09:00
victor.petukhov
cf161f8234
Rework notForIncompletionCall test
2019-11-17 15:19:28 +03:00
igoriakovlev
cb11282183
Merge pull request #2516 from t-kameyama/KT-18539
...
KT-18539 Default implement fun/property text shouldn't contain scary comment
2019-11-13 19:33:44 +03:00
Pavel Kirpichenkov
9a231bbbfa
Update trailing lambda quickfix, add tests
...
Case of incorrect call expression as the receiver of dot-qualified expression
was not handled properly.
Now the following order is used:
- If parent is a call expression or if this call is a receiver of parent
dot-qualified expression, parent must get last lambda as a new receiver;
- Otherwise, if parent is a dot-qualified expression, this call is in selector position.
Then grandparent is checked for being call or dot-qualified expression. If so, trailing
lambda must become grandparent's new receiver. If not, trailing nodes become standalone
epressions after parent.
- Otherwise, incorrect call expression is a standalone expression, so trailing nodes
may be lifted and put after it.
2019-11-13 11:00:01 +03:00
Pavel Kirpichenkov
f1934fa49d
Amend "Terminate preceding call with semicolon" quickfix
...
Quickfix wasn't aware of cases, when expression to be fixed
is a part of parent call expression or dot-qualified expression.
Incorrect position for extracting trailing lambdas led to broken
formatting.
#KT-34694 Fixed
2019-11-13 11:00:01 +03:00
Toshiaki Kameyama
4d9b19da82
Remove comments from function/property implementation template
...
#KT-18539 Fixed
2019-11-13 08:37:25 +09:00
victor.petukhov
62d204f4d6
Support trailing comma
...
^KT-34743 Fixed
2019-11-01 19:40:20 +03:00
Toshiaki Kameyama
68ea677cc4
Import quick fix: support extension iterator function
...
#KT-34303 Fixed
2019-10-29 18:35:14 +07:00
Dmitry Gridin
5d16753285
ImportFix: add support for WRONG_NUMBER_OF_TYPE_ARGUMENTS
...
#KT-23834 Fixed
2019-10-29 17:25:17 +07:00
Toshiaki Kameyama
60f4ed914a
"Add parameter to function" quick fix: apply for TYPE_MISMATCH error
...
#KT-8478 Fixed
2019-10-22 21:22:33 +07:00
Toshiaki Kameyama
e8effe6727
Replace with safe call: do not add redundant elvis operator
...
#KT-34432 Fixed
2019-10-21 23:28:19 +07:00
Toshiaki Kameyama
27eea882fb
ChangeVisibilityFix: remove redundant property setter
...
#KT-33796 Fixed
2019-10-21 15:55:04 +07:00
Toshiaki Kameyama
48968c0fe2
Replace deprecated symbol usage: do not include 'Companion' in import directives when importing companion object
...
#KT-34078 Fixed
2019-10-21 15:55:04 +07:00
Toshiaki Kameyama
d72e55d1b7
Add "Make private and overrides member" quick fix for ACCIDENTAL_OVERRIDE
...
#KT-18536 Fixed
2019-10-17 17:08:03 +07:00
Yan Zhulanow
d153aa87a8
Fix EA-126019: Handle 'null' PsiType as nullable Any in "Create" actions
2019-10-08 19:13:56 +09:00
Pavel Kirpichenkov
b7e5d9faae
Update annotation rendering in diagnostics
...
Disable annotation rendering in default type and descriptor renderers.
Preserve annotations in Android and Serialization plugins.
Update error texts in ide tests.
Nullability annotations in Java descriptors are rendered with context-dependent renderer.
#KT-20258 Fixed
2019-10-04 11:18:45 +03:00
Dmitry Gridin
1b7b546249
Tests: fix some tests in quickfix
2019-10-03 15:23:05 +07:00
Toshiaki Kameyama
d86e87d35e
Add quickfix to change object to class
...
#KT-33586 Fixed
2019-10-02 19:42:30 +07:00
Toshiaki Kameyama
ac7e955d3e
Change parameter type quick fix: don't use qualified name
...
#KT-32012 Fixed
2019-10-02 18:41:54 +07:00
Roman Golyshev
c463fad3b7
KT-34000: Allow autoimport to suggest fixes in qualified expressions
...
- it is required to be able to autoimport extensions from objects,
not only from the top level
- use `substituteExtensionIfCallable` to handle generics for extension methods
- move finding expression receivers to the separate method, add `Receivers` value class to hold found receivers
- change `CallableDescriptor.isValidByReceiversFor` to return false
if explicit receiver is not required for the descriptor
- ^KT-34000 Fixed
2019-10-02 13:46:47 +03:00
Toshiaki Kameyama
b2d2165342
Add "Remove redundant label" quick fix for REDUNDANT_LABEL_WARNING
...
#KT-26431 Fixed
2019-10-02 16:40:13 +07:00
Pavel Kirpichenkov
6c8e829f19
Update diagnostics for trailing lambdas, add quickfix
...
Alternative message for errors, caused by unexpected lambda expression arguments on a new line.
Both diagnostic are reported, if multiple lambda expressions were passed to the call.
For other errors trailing lambda diagnostic overrides the original one.
Quickfix for erroneous trailing lambdas on a new line after call.
Fix separates lambda expression from previous call with semicolon.
All trailing lambda arguments become standalone lambda expressions.
2019-09-25 15:38:17 +03:00
Toshiaki Kameyama
7fcca71b4b
Replace with dot call quickfix: don't break formatting
...
#KT-25697 Fixed
2019-09-25 12:06:51 +07:00
Toshiaki Kameyama
44edd94fea
"Create member function" quick fix: do not add redundant semicolons after enum entry
...
#KT-14899 Fixed
2019-09-24 19:40:31 +07:00
Toshiaki Kameyama
0497f0cba4
"Create enum constant" quick fix: add before semicolon
...
#KT-33718 Fixed
2019-09-24 19:31:52 +07:00
Toshiaki Kameyama
30c41e6720
"Create type parameter from usage": don't suggest for not extension property
...
#KT-33300 Fixed
2019-09-24 19:28:40 +07:00
Toshiaki Kameyama
5b666ff33f
"Create type parameter from usage": don't remove backticks if necessary
...
#KT-33299 Fixed
2019-09-24 19:24:02 +07:00
Dmitry Gridin
1ee827bfc8
Import quick fix: support provideDelegate
...
#KT-28049 Fixed
2019-09-24 16:27:10 +07:00
Toshiaki Kameyama
79199260b9
Import quick fix: suggest for operator extension function called from name reference
...
#KT-28049 Fixed
2019-09-24 16:27:09 +07:00
Toshiaki Kameyama
d9d04fc556
"Create enum constant" quick fix: do not add redundant empty line
...
#KT-32981 Fixed
2019-09-24 13:23:06 +07:00
Nikolay Krasko
ee4ab967a4
Force resolve check for dispatch thread instead of isWriteAccessAllowed
...
isWriteAccessAllowed = dispatch thread + write lock
2019-09-23 16:54:35 +03:00
Pavel Kirpichenkov
55cb9561c2
Provide better error messages for read-only delegate
...
Split error reporting into two parts for incorrect and missing candidates.
Missing function error is not reported on provideDelegate.
Update error factory and default message for error.
Update error texts in quick fix test data.
#KT-16526 Fixed
2019-09-12 14:58:21 +03:00
Dmitry Gridin
c4a1101600
KtSimpleNameReference: add root prefix support to bindToFqName function
2019-09-05 18:01:23 +07:00
Igor Yakovlev
7b2f39530a
Fix invalid testdata for ConvertToScopeIntention applicability
2019-08-28 16:31:49 +03:00
Igor Yakovlev
1e72116a9c
Fix test data for intention tests
...
The ExtractDeclarationFromCurrentFileIntention applicability range was changed by commit 3b35c2d24 so the test data of several test comes invalid
2019-08-28 13:07:33 +03:00
Dereck Bridie
8f2a73b734
KT-28471: "Add initializer" quickfix initializes non-null variable with null
2019-08-23 14:15:08 +07:00
Dmitry Gridin
cf3b92d80e
CreateTypeParameterFromUsageFix: fix KNPE for type alias
...
#KT-33302 Fixed
#EA-120181 Fixed
2019-08-20 17:04:00 +07:00
Toshiaki Kameyama
3742993dea
Change to star projection: do not suggest when type paramer is generic type
...
#KT-30794 Fixed
2019-07-31 20:51:57 +03:00