Commit Graph

249 Commits

Author SHA1 Message Date
Mikhail Glukhikh c084eefb65 Fix a bunch of IDE quick-fix tests (related to "convert to run/...")
These actions became available more often some days ago
2019-02-25 10:37:46 +03:00
Dmitry Gridin 147521d6cb Add intention to introduce import alias
#KT-16118 Fixed
 #KT-30007 Fixed
2019-02-21 12:25:09 +03:00
Mikhail Glukhikh 6e10235208 Make "Add name(s) to call arguments" available for generic arguments
#KT-15550 Fixed
2018-10-27 12:13:42 +03:00
Mikhail Glukhikh 4a3af36909 Remove SHOULD_FAIL_WITH from testQuotesName thus fixing it 2018-09-18 11:50:37 +03:00
Mikhail Glukhikh 0f8b46b7d7 Add language version 1.2 to quick-fix tests for add explicit import
This fixes tests for KT-21515
2018-09-18 11:50:33 +03:00
Toshiaki Kameyama dc57887a4d Create function quick fix: fix visibility from inline method #KT-25228 Fixed 2018-09-04 19:01:22 +03:00
Mikhail Glukhikh 9a9e703e80 Do not suggest "create abstract property" inside annotation 2018-08-17 18:16:07 +03:00
Mikhail Glukhikh 04675b4446 Do not suggest "create local variable" inside primary constructor
#KT-26158 Fixed
EA-99300 Fixed
2018-08-17 18:15:47 +03:00
Alexey Sedunov 1f59ff1bd4 Minor: Fix test data 2018-08-08 15:32:00 +03:00
Mikhail Glukhikh d7317c58e9 Move "Add test library to classpath" to irrelevant action list
This prevents inconsistencies like "Add JUnit 5.0" / "Add JUnit 5.2"
Should fix one relevant test
2018-08-06 19:04:12 +03:00
Vyacheslav Gerasimov a2bf417d75 Remove 172 bunchset 2018-08-02 19:32:18 +03:00
Mikhail Glukhikh 152327d69d Fix erroneous full resolve cache filling
Before this commit, we could store partial resolve results in full
resolve cache (for some declarations, e.g. primary constructors).
This may be done iff current partial resolve mode provides all results
from full resolve mode (CFA results & diagnostics).
Otherwise we should not do it.

This fixes four quick-fix tests on CreateTypeParameter
So #KT-23860 Fixed
So #KT-22758 Fixed
2018-06-20 17:18:18 +03:00
Alexey Sedunov 610cc3867b Create Class from Usage: Filter out usages in super type entry list
#KT-22918 Fixed
2018-05-25 23:03:26 +03:00
Toshiaki Kameyama 5564102a3e Add "Create secondary constructor" quick fix on NONE_APPLICABLE error #KT-22371 Fixed 2018-05-18 18:11:13 +03:00
Alexey Sedunov a5a13b74f5 Create from Usage: Support smart casts on explicit receivers
#KT-24069 Fixed
2018-05-11 16:05:20 +03:00
Alexey Sedunov a4a10c7ba4 Create from Usage: Fix generation of extensions with nullable receiver
#KT-23796 Fixed
2018-05-11 16:05:19 +03:00
Vyacheslav Gerasimov 8d3f71a04f 172: Revert "Quick Fixes: Support cross-language "Create from Usage" with Kotlin target"
This reverts commit 908bf71
2018-04-11 16:28:09 +03:00
Nikolay Krasko a7d705b5d8 172: Revert "Fix inAnnotation test in 173 branch"
This reverts commit 955842f2009a2c5aa9ac955340696bd7e1a2651d.
2018-04-11 16:27:58 +03:00
Alexey Sedunov 96de29dfcb Create from Usage: Support accessors for local delegated properties
#KT-19730 Fixed
2018-03-06 15:15:40 +03:00
Dmitry Savvinov d570b863ce Introduce deprecation of companion objects nested classes
Introdude deprecation as per KT-21515. Warning is reported on type
usage, that soon will became invisible. Quickfix by adding explicit
import is added.

Idea behind implementation is to mark scopes that are deprecated (see
ClassResolutionScopesSupport).

Then, during walk along hierarchy of scopes, look at deprecation status
of the scope that has provided this classifier.
Note that we also have to check if there are *some* non-deprecated
visibility paths (because we can see classifier by two paths, e.g. if
we've added explicit import) -- then this type reference shouldn't be
treated as deprecated.
2018-02-21 16:04:49 +03:00
Alexey Sedunov acf6408474 Create from Usage: Fix "Create class" applicability check for when entries
#KT-22329 Fixed
2018-02-21 13:21:17 +03:00
Toshiaki Kameyama a36e8c86f1 KT-22428 Create member function from usage shouldn't present type parameters as options (#1509)
* KT-22428 Create member function from usage shouldn't present type parameters as options

* Reformat & cleanup
2018-02-17 14:09:44 +03:00
Mikhail Glukhikh 00ceac54fc Fix "create enum constant" test (create type alias is no longer here) 2018-01-31 13:56:07 +03:00
Toshiaki Kameyama 2a10d8e837 KT-15176 Remove "Create type alias" intention when called on java class 2018-01-18 16:23:40 +03:00
Kirill Rakhman 8bc020f31b Fix modifier order in generated overriden functions
Fixes #KT-21600
2018-01-16 15:42:02 +01:00
Alexey Sedunov 908bf71ae6 Quick Fixes: Support cross-language "Create from Usage" with Kotlin target 2018-01-16 17:06:53 +03:00
Nikolay Krasko cbfd7088bf Fix inAnnotation test in 173 branch 2018-01-12 13:54:17 +03:00
Alexey Sedunov 4ac870500f Minor: Fix test data 2017-12-21 16:01:29 +03:00
Toshiaki Kameyama 411feab9ae KT-21698 Create interface shouldn't suggest to declare it inside a class which implements it 2017-12-20 18:14:55 +01:00
Nikolay Krasko ab28bdf32f Store in test data failure for quotedName name 2017-12-05 16:07:55 +03:00
Alexey Sedunov 84c6f9bf45 Create from Usage: Fix choosing superclass for abstract member
This applies to cases when non-existing member is called without
explicit receiver

 #KT-21332 Fixed
2017-11-30 12:49:25 +03:00
Alexey Sedunov 7e3ca4734d Create from Usage: Add val to data class parameter
Also place new parameters on the new line if previous ones have line breaks

 #KT-21162 Fixed
2017-11-30 12:49:25 +03:00
Toshiaki Kameyama 1043284afe Add data modifier to a class quickfix #KT-18220 Fixed 2017-09-25 14:17:35 +03:00
Alexey Sedunov 97a3d343f7 Create Class from Usage: Support nested classes
This covers the case when original expression doesn't contains qualifier
Also for local or inner containing classes:
  - forbid nested objects
  - add 'inner' to nested class declaration

 #KT-16404 Fixed
2017-08-04 16:48:36 +03:00
Alexey Sedunov 78117b3e7b Create from Usage: Infer expected type from base declarations
#KT-17480 Fixed
2017-08-04 16:48:35 +03:00
Alexey Sedunov eda747c0bf Minor: Fix tests 2017-07-19 11:34:30 +03:00
Mikhail Glukhikh 43f9035d07 Minor test fix 2017-07-18 13:51:27 +03:00
Alexey Sedunov e98af7bfc1 Create Class from Usage: Use type parameter bounds as supertypes
#KT-15242 Fixed
2017-07-17 16:09:55 +03:00
Alexey Sedunov 95769dc9d3 Create from Usage: Make property lateinit where possible
#KT-17651 Fixed
2017-07-17 16:09:54 +03:00
Alexey Sedunov e9bf1d2ab8 Create from Usage: Add test for KT-17537
#KT-17537 Fixed
2017-07-17 16:09:53 +03:00
Alexey Sedunov 0365d3a3d6 Create from Usage: Do not create type parameter by constuctor reference
#KT-17353 Fixed
2017-07-17 16:09:52 +03:00
Alexey Sedunov 2e76a76088 Control Flow: Fix CFG usage info for double-colon expressions
#KT-12551 Fixed
 #KT-17092 Fixed
2017-07-17 16:09:51 +03:00
Alexey Sedunov 26d6088c82 Create from Usage: Infer expected type for lambda body
#KT-18186 Fixed
2017-07-17 16:09:49 +03:00
Alexey Sedunov b48feb257c Create from Usage: Create data class property from destructuring entry
#KT-18540 Fixed
2017-07-17 16:09:48 +03:00
Mikhail Zarechenskiy ee173077c0 Simplify diagnostic when there are wrong number of type arguments
#KT-12767 Fixed
2017-07-12 14:37:27 +03:00
Mikhail Glukhikh d08b18f5f8 Introduce "use expression body" inspection #KT-16063 Fixed
Converted from the relevant intention
Reported cases: one-liners, whens
Also, more exact caret detection in local inspection tests
2017-07-07 18:15:06 +03:00
Dmitry Jemerov 558203e2bb Rename "Remove no constructor" to "Remove constructor call"; fix test 2017-06-07 19:49:45 +02:00
Dmitry Petrov c83b764c73 Update testData after changes in diagnostics 2017-05-26 13:58:46 +03:00
Dmitry Petrov 7979663e6c Update testData for changed diagnostic messages 2017-05-26 13:58:46 +03:00
Valentin Kipyatkov 1fe6886a33 Fixed error message to quote parameter name 2017-05-20 23:44:20 +03:00