Fix Completion: keyword 'typealias' is not suggested
Fixes #KT-13242
This commit is contained in:
@@ -46,9 +46,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
|
|||||||
open class KeywordLookupObject
|
open class KeywordLookupObject
|
||||||
|
|
||||||
object KeywordCompletion {
|
object KeywordCompletion {
|
||||||
private val NON_ACTUAL_KEYWORDS = setOf(TYPE_ALIAS_KEYWORD)
|
|
||||||
private val ALL_KEYWORDS = (KEYWORDS.types + SOFT_KEYWORDS.types)
|
private val ALL_KEYWORDS = (KEYWORDS.types + SOFT_KEYWORDS.types)
|
||||||
.filter { it !in NON_ACTUAL_KEYWORDS }
|
|
||||||
.map { it as KtKeywordToken }
|
.map { it as KtKeywordToken }
|
||||||
|
|
||||||
private val KEYWORDS_TO_IGNORE_PREFIX = TokenSet.create(OVERRIDE_KEYWORD /* it's needed to complete overrides that should be work by member name too */)
|
private val KEYWORDS_TO_IGNORE_PREFIX = TokenSet.create(OVERRIDE_KEYWORD /* it's needed to complete overrides that should be work by member name too */)
|
||||||
|
|||||||
@@ -41,4 +41,5 @@ class MouseMovedEventArgs
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -35,4 +35,5 @@ class B {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -40,4 +40,5 @@ class A {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -29,4 +29,5 @@ fun foo() {
|
|||||||
// EXIST: when
|
// EXIST: when
|
||||||
// EXIST: while
|
// EXIST: while
|
||||||
// EXIST: as
|
// EXIST: as
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -26,4 +26,5 @@ fun foo() {
|
|||||||
// EXIST: var
|
// EXIST: var
|
||||||
// EXIST: when
|
// EXIST: when
|
||||||
// EXIST: while
|
// EXIST: while
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -39,4 +39,5 @@ var a : Int
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -26,4 +26,5 @@ annotation class Test {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -38,4 +38,5 @@ public class Test {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -32,4 +32,5 @@ class TestClass {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -20,4 +20,5 @@ fun foo() {
|
|||||||
// EXIST: var
|
// EXIST: var
|
||||||
// EXIST: when
|
// EXIST: when
|
||||||
// EXIST: while
|
// EXIST: while
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ enum class Test {
|
|||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
// EXIST: fun
|
// EXIST: fun
|
||||||
|
// EXIST: typealias
|
||||||
|
|
||||||
/* TODO: items below are not valid here */
|
/* TODO: items below are not valid here */
|
||||||
// EXIST: class
|
// EXIST: class
|
||||||
|
|||||||
@@ -28,4 +28,5 @@ interface Test {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -29,4 +29,5 @@ object Test {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -26,4 +26,5 @@ package Test
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -40,4 +40,5 @@ class Some {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -40,4 +40,5 @@ class Some {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -38,4 +38,5 @@ class Some {
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
@@ -25,4 +25,5 @@
|
|||||||
// EXIST: annotation class
|
// EXIST: annotation class
|
||||||
// EXIST: const
|
// EXIST: const
|
||||||
// EXIST: suspend
|
// EXIST: suspend
|
||||||
|
// EXIST: typealias
|
||||||
// NOTHING_ELSE
|
// NOTHING_ELSE
|
||||||
|
|||||||
Reference in New Issue
Block a user