diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/KeywordCompletion.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/KeywordCompletion.kt index c9582eaae1d..fdaa21d31e7 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/KeywordCompletion.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/KeywordCompletion.kt @@ -46,9 +46,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull open class KeywordLookupObject object KeywordCompletion { - private val NON_ACTUAL_KEYWORDS = setOf(TYPE_ALIAS_KEYWORD) private val ALL_KEYWORDS = (KEYWORDS.types + SOFT_KEYWORDS.types) - .filter { it !in NON_ACTUAL_KEYWORDS } .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 */) diff --git a/idea/idea-completion/testData/keywords/AfterClassProperty.kt b/idea/idea-completion/testData/keywords/AfterClassProperty.kt index 881f97ac64d..9f499989993 100644 --- a/idea/idea-completion/testData/keywords/AfterClassProperty.kt +++ b/idea/idea-completion/testData/keywords/AfterClassProperty.kt @@ -41,4 +41,5 @@ class MouseMovedEventArgs // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/AfterClasses.kt b/idea/idea-completion/testData/keywords/AfterClasses.kt index 101ee4cc54d..65c95f23820 100644 --- a/idea/idea-completion/testData/keywords/AfterClasses.kt +++ b/idea/idea-completion/testData/keywords/AfterClasses.kt @@ -35,4 +35,5 @@ class B { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/AfterFuns.kt b/idea/idea-completion/testData/keywords/AfterFuns.kt index 11f029cfd46..a9ba0bfbf51 100644 --- a/idea/idea-completion/testData/keywords/AfterFuns.kt +++ b/idea/idea-completion/testData/keywords/AfterFuns.kt @@ -40,4 +40,5 @@ class A { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/AfterTryCatch.kt b/idea/idea-completion/testData/keywords/AfterTryCatch.kt index ee4f1dd9e71..543f486c4fd 100644 --- a/idea/idea-completion/testData/keywords/AfterTryCatch.kt +++ b/idea/idea-completion/testData/keywords/AfterTryCatch.kt @@ -29,4 +29,5 @@ fun foo() { // EXIST: when // EXIST: while // EXIST: as +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/AfterTryFinally.kt b/idea/idea-completion/testData/keywords/AfterTryFinally.kt index f84949fa6e1..585cf58dc72 100644 --- a/idea/idea-completion/testData/keywords/AfterTryFinally.kt +++ b/idea/idea-completion/testData/keywords/AfterTryFinally.kt @@ -26,4 +26,5 @@ fun foo() { // EXIST: var // EXIST: when // EXIST: while +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt b/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt index 4b142976f63..430515c65c1 100644 --- a/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt +++ b/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt @@ -39,4 +39,5 @@ var a : Int // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt b/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt index 127955bba89..1bdb19250e7 100644 --- a/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt +++ b/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt @@ -26,4 +26,5 @@ annotation class Test { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InClassBeforeFun.kt b/idea/idea-completion/testData/keywords/InClassBeforeFun.kt index 61b35e4d3b7..085bb80d564 100644 --- a/idea/idea-completion/testData/keywords/InClassBeforeFun.kt +++ b/idea/idea-completion/testData/keywords/InClassBeforeFun.kt @@ -38,4 +38,5 @@ public class Test { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InClassScope.kt b/idea/idea-completion/testData/keywords/InClassScope.kt index 67049bb2c7e..bc8a7ebbc13 100644 --- a/idea/idea-completion/testData/keywords/InClassScope.kt +++ b/idea/idea-completion/testData/keywords/InClassScope.kt @@ -32,4 +32,5 @@ class TestClass { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InCodeBlock.kt b/idea/idea-completion/testData/keywords/InCodeBlock.kt index 7b98ccf787b..12bc7d13e0c 100644 --- a/idea/idea-completion/testData/keywords/InCodeBlock.kt +++ b/idea/idea-completion/testData/keywords/InCodeBlock.kt @@ -20,4 +20,5 @@ fun foo() { // EXIST: var // EXIST: when // EXIST: while +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InEnumScope2.kt b/idea/idea-completion/testData/keywords/InEnumScope2.kt index e57d4f76704..4f80b7af3ac 100644 --- a/idea/idea-completion/testData/keywords/InEnumScope2.kt +++ b/idea/idea-completion/testData/keywords/InEnumScope2.kt @@ -27,6 +27,7 @@ enum class Test { // EXIST: const // EXIST: suspend // EXIST: fun +// EXIST: typealias /* TODO: items below are not valid here */ // EXIST: class diff --git a/idea/idea-completion/testData/keywords/InInterfaceScope.kt b/idea/idea-completion/testData/keywords/InInterfaceScope.kt index 312f8c1df5f..67e3548e139 100644 --- a/idea/idea-completion/testData/keywords/InInterfaceScope.kt +++ b/idea/idea-completion/testData/keywords/InInterfaceScope.kt @@ -28,4 +28,5 @@ interface Test { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InObjectScope.kt b/idea/idea-completion/testData/keywords/InObjectScope.kt index ca8f756e124..4043d22ab1b 100644 --- a/idea/idea-completion/testData/keywords/InObjectScope.kt +++ b/idea/idea-completion/testData/keywords/InObjectScope.kt @@ -29,4 +29,5 @@ object Test { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt b/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt index 089af7852b7..3119a0b3260 100644 --- a/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt +++ b/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt @@ -26,4 +26,5 @@ package Test // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/PropertyAccessors.kt b/idea/idea-completion/testData/keywords/PropertyAccessors.kt index b1dc91758cb..9fae40aceb9 100644 --- a/idea/idea-completion/testData/keywords/PropertyAccessors.kt +++ b/idea/idea-completion/testData/keywords/PropertyAccessors.kt @@ -40,4 +40,5 @@ class Some { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/PropertyAccessors2.kt b/idea/idea-completion/testData/keywords/PropertyAccessors2.kt index eb95815694f..ae715ad0b43 100644 --- a/idea/idea-completion/testData/keywords/PropertyAccessors2.kt +++ b/idea/idea-completion/testData/keywords/PropertyAccessors2.kt @@ -40,4 +40,5 @@ class Some { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/PropertySetter.kt b/idea/idea-completion/testData/keywords/PropertySetter.kt index 8e7c007db38..a7fbbff4518 100644 --- a/idea/idea-completion/testData/keywords/PropertySetter.kt +++ b/idea/idea-completion/testData/keywords/PropertySetter.kt @@ -38,4 +38,5 @@ class Some { // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/TopScope.kt b/idea/idea-completion/testData/keywords/TopScope.kt index ee53e3ce4f4..0b859db8025 100644 --- a/idea/idea-completion/testData/keywords/TopScope.kt +++ b/idea/idea-completion/testData/keywords/TopScope.kt @@ -25,4 +25,5 @@ // EXIST: annotation class // EXIST: const // EXIST: suspend +// EXIST: typealias // NOTHING_ELSE