Commit Graph

34 Commits

Author SHA1 Message Date
Toshiaki Kameyama 05d8932fa6 Remove useless cast: don't remove parentheses for lambda
#KT-28641 Fixed
2019-01-09 12:16:01 +03:00
Andrius Semionovas f42808af94 Add when support for USELESS_IS_CHECK quick fix, related to KT-18965 2017-07-31 16:10:41 +03:00
Andrius Semionovas e0aca97f9f Add quick-fix for USELESS_IS_CHECK #KT-18965 Fixed 2017-07-31 16:10:23 +03:00
Valentin Kipyatkov 7625672914 Better test data 2016-09-23 10:07:15 +03:00
Mikhail Glukhikh 52dacd1d49 KT-13430 related: add non-null assertion works also for UNSAFE_INFIX_CALL 2016-08-12 17:43:31 +03:00
Mikhail Glukhikh cf2d575eec Add non-null assertion: correct handling of unary expression unsafe calls #KT-13430 Fixed 2016-08-12 17:43:26 +03:00
Mikhail Glukhikh a9c30e878b KT-12628: !! is now correctly added to array expressions
(cherry picked from commit 56c9d7e)
2016-07-29 20:12:02 +03:00
Mikhail Glukhikh 954952ae71 Surround with null check : apply for ITERATOR_ON_NULLABLE 2016-06-13 15:34:15 +03:00
Valentin Kipyatkov a68dbe78d8 KT-11594 "Add non-null asserted (!!) call" applied to unsafe cast to nullable type causes AE at KtPsiFactory.createExpression()
#KT-11594 Fixed
2016-04-20 14:30:53 +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
Denis Zharkov 816c66063b Report special diagnostic when fake-call receiver is nullable
#KT-3602 Fixed
2016-02-02 08:17:49 +03:00
Alexey Sedunov 2e18ad7160 Remove Right Part of Binary Expression Quick-Fix: Split to separate quick fixes for cast- and elvis-expressions 2016-01-13 17:47:23 +03:00
Nikolay Krasko 0fcb51f0a2 KT-1478 Quick fix for using nullable collection in "for in" expression
#KT-1478 Fixed
2015-10-28 13:39:49 +03:00
Denis Zharkov f0e3fd617d Adjust testData to CharSequence.length transformation 2015-10-14 20:39:35 +03:00
Dmitry Jemerov 1523d5bcbf removing static type assertions work in progress 2015-10-12 11:11:23 +02:00
Valentin Kipyatkov aefe0dd192 Changed highlighting range and attributes of useless elvis operator 2015-06-02 14:35:19 +03:00
Valentin Kipyatkov 837e46a9b8 Big change in quickfix tests: no stupid test data format with "before" and "after" file prefixes 2015-05-08 22:29:42 +03:00
Dmitry Jemerov 55cfd3b0c7 fix QuickFixTestGenerated$Expressions.testRemoveUselessCast 2015-04-29 16:33:39 +02:00
Dmitry Jemerov f374eec8f1 deprecating types after colon 2015-04-29 16:33:24 +02:00
Dmitry Jemerov 98b8784ab0 drop deprecated syntax for anonymous initializer blocks 2015-04-29 14:07:04 +02:00
Alexey Sedunov a2162810ff Quick-Fixes: Drop unnecessary parentheses when simplifying cast expressions
#KT-6501 Fixed
2015-03-24 16:40:59 +03:00
Alexey Sedunov 71a5e09a0b Quick-Fixes: Support USELESS_CAST diagnostic in "Remove cast" quick-fix
#KT-6422 Fixed
2015-03-24 16:40:58 +03:00
Alexander Udalov a7b88e9485 Make CharSequence.length a function instead of property
And String.length as well.

This is done for JVM interoperability: java.lang.CharSequence is an open class
and has a function 'length()' which should be implemented in subclasses
somehow.

A minor unexpected effect of this is that String.length() is now a compile-time
constant (it wasn't such as a property because properties are not supported in
compile-time constant evaluation)

 #KT-3571 Fixed
2014-11-27 20:38:17 +03:00
Wojciech Lopata 58a8c0ed08 QuickFix for DANGLING_FUNCTION_LITERAL_ARGUMENT_SUSPECTED 2013-02-21 16:00:24 +01:00
Nikolay Krasko 83d0e8ebb5 - Merge https://github.com/JetBrains/kotlin/pull/90
- Move introduce and remove !! call to one class
2012-07-02 20:41:18 +04:00
Sergey Lukjanov d879827371 Test for "unnecessary non-null assertion quickfix should not displayed for 'value!!.foo()' case" has been added. 2012-07-02 20:41:17 +04:00
Nikolay Krasko bade0e0275 Check that quick fixes don't produce new errors 2012-06-27 17:41:21 +04:00
Sergey Lukjanov 4478f2dc4a Test for unnecessary non-null assertion fixed 2012-06-20 13:06:53 +04:00
Sergey Lukjanov a4584e96d7 Tests has been added 2012-06-18 18:47:32 +04:00
svtk 4272dafc36 ReplaceCallFix instead of two ReplaceDotCallWithSafeCall & ReplaceSafeCallWithDotCall 2011-12-27 19:21:33 +04:00
svtk 7f46ed8e53 added fix "replace dot call with safe call" (from Sergey Ignatov) 2011-12-27 17:44:35 +04:00
Nikolay Krasko 0c758902ef KT-621 Remove .foo() pattern matching from when (Some tests were rewritten) 2011-11-25 17:39:16 +04:00
svtk f7950f9469 rename 2011-10-25 17:40:36 +04:00
svtk 7f815176f6 Added more quickfixes; added tests 2011-09-21 17:58:44 +04:00