Commit Graph

175 Commits

Author SHA1 Message Date
Vladimir Dolzhenko afd71d3d19 Adjust tests due to "Remove argument" quick fix for TOO_MANY_ARGUMENTS
Relates to #KT-34026
Relates to #KT-34332
2020-02-25 09:23:46 +01:00
Dmitry Gridin 6c439ae85a Create TrailingCommaIntention
#KT-34744
2020-02-04 21:34:53 +07:00
Roman Golyshev 42deb7db48 KT-34582 Exclude kotlin.coroutines.experimental package from completion and auto-import
- Exclusion happens only when `ReleaseCoroutines` feature is supported
- Add `LANGUAGE_VERSION` to few tests to make sure that previous exclusions still work when `experimental` package is not excluded entirely
- ^KT-34582 Fixed
2019-12-29 15:35:49 +03:00
Dmitry Gridin 37371edb8c Auto-import: add quickfix for overloaded generic function
#KT-34667 Fixed
2019-11-29 21:09:24 +07:00
victor.petukhov cf161f8234 Rework notForIncompletionCall test 2019-11-17 15:19:28 +03: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
Dmitry Gridin 1b7b546249 Tests: fix some tests in quickfix 2019-10-03 15:23:05 +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
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
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
Dmitry Gridin 074829bcea Import: IDE should import class from root package
#KT-21422 Fixed
2019-07-02 11:54:38 +07:00
Toshiaki Kameyama fbd992f8c7 Add intentions to convert lazy <--> ordinary property
#KT-23501 Fixed
2019-06-17 01:10:19 +03:00
Dmitry Gridin 605ee041a9 Remove CreateTypeAliasFromUsageFix
Relates to #KT-31519
2019-05-31 18:00:56 +07:00
Igor Yakovlev bb071263b0 Fix JVMStatic annotation for UL-properties 2019-05-13 11:21:12 +03:00
Igor Yakovlev 0d31df7fb7 Fix invalid test data for static import quick fix 2019-05-13 11:21:12 +03:00
Mikhail Zarechenskiy d4d1648e1d [IDE-NI-MIGRATE] Migrate QuickFix tests for new inference 2019-05-06 13:59:24 +03:00
Dmitry Gridin 4f8e29ad23 Fix import quickfix if import has import alias
#KT-30669 Fixed
 #KT-7380 Fixed
 #KT-30663 Fixed
2019-04-05 20:01:11 +07:00
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
Denis Zharkov 9f3a902ff3 Take into account refined applicability of dsl-marker in IDE
After the previous change, when being applied to a function type
with receiver it's assumed to work just as it's applied to receiver type

Thus, it's necessary to fix relevant IDE features relied on DSL markers

 #KT-23255 Fixed
2018-08-14 15:58:18 +07:00
Dmitry Savvinov 76c651421b Deprecate visibility of static members inherited from Java
Now they are not visible by short name through companion objects, just
like classifiers in KT-21515

^KT-25333 In progress
2018-07-19 13:32:38 +03:00
Mikhael Bogdanov 56c535d505 Fix test data 2018-07-19 10:52:13 +02: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
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
Nikolay Krasko 704ce121bc Use other property name in Java with Kotlin static import tests 2018-01-17 12:05:06 +03:00
Nikolay Krasko 23bd0b3db5 Update test data because of changed action name in 173 2018-01-12 13:54:06 +03:00
Simon Ogorodnik 094125c970 KT-19154: Fix auto-import to check receiver for members properly
#KT-19154 fixed
2017-07-25 16:16:57 +03:00
Mikhail Zarechenskiy e82c909f75 Use more specific status to report diagnostics
#KT-12737 Fixed
2017-07-12 14:37:26 +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
Mikhail Zarechenskiy 0579604653 Do not propose to specify constructor invocation in diagnostics
#KT-17188 Fixed
2017-06-22 15:02:10 +03:00
Dmitry Petrov c83b764c73 Update testData after changes in diagnostics 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
Mikhail Glukhikh 382bf9a500 ConvertReferenceToLambda status refactoring
Intention is not registered now; inspection is enabled by default now,
 but has highlight level of "No highlighting"
2017-05-10 14:56:38 +03:00
Simon Ogorodnik 3acebc3001 Fix KNPE in KotlinAddImportActionKt.createSingleImportActionForConstructor
#KT-17525 fixed
2017-04-24 19:18:13 +03:00
Simon Ogorodnik c6cdbe7eed Fix import member quickfix to check receiver
#KT-17037 fixed
2017-04-11 20:29:15 +03:00
Dmitry Jemerov 4f229c3fdc Convert AbstractQuickFixMultiFileTest to light fixture test case 2017-03-27 19:48:51 +02:00
Dmitry Jemerov e2f75463d7 Rewrite AbstractQuickFixTest based on light fixture test case
Don't reconfigure runtime before every test. For consistency,
mark tests that require the runtime with directives instead of relying
on test file names.
2017-03-27 19:48:43 +02:00
Alexey Sedunov 834cdd63ab Create from Usage: Support class generation by class literal expression
#KT-16188 Fixed
2017-03-19 17:19:48 +03:00
Simon Ogorodnik 3bf7223448 Internal Kotlin packages now should be completable in parent packages
Internal packages which are hard-excluded from completion and
 imports now should be visible there if file package are parent of
 excluded one
 e.g kotlin.jvm.internal.* now visible from kotlin and kotlin.jvm
 #KT-16214 fixed
2017-03-09 19:05:10 +03:00
Simon Ogorodnik 98269c10d8 KT-15744 Intention to import sleep wrongly suggests Thread.sleep
#KT-15744 fixed
2017-02-06 14:56:18 +03:00
Denis Zharkov 88b82d5fa2 Exclude coroutine inrinsics and internal packages
#KT-16018
2017-01-30 15:45:02 +03:00
Dmitry Petrov a974ed1049 Support custom accessors for top-level properties in scripts. 2017-01-26 10:12:13 +03:00
Simon Ogorodnik 3948c1e007 KT-15153 Support typeAlias extensions in completion and add import
#KT-15153 fixed
2017-01-25 20:47:48 +03:00
Simon Ogorodnik 4ca10c61fd KT-11308 Hide kotlin.jvm.internal package contents from completion and auto-import
#KT-11308 fixed
2017-01-25 17:39:36 +03:00