Fix Completion: keyword 'typealias' is not suggested

Fixes #KT-13242
This commit is contained in:
Kirill Rakhman
2016-07-27 19:02:08 +02:00
parent 915e36cb02
commit f378089b96
19 changed files with 18 additions and 2 deletions
@@ -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 */)
@@ -41,4 +41,5 @@ class MouseMovedEventArgs
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -35,4 +35,5 @@ class B {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
+1
View File
@@ -40,4 +40,5 @@ class A {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -29,4 +29,5 @@ fun foo() {
// EXIST: when
// EXIST: while
// EXIST: as
// EXIST: typealias
// NOTHING_ELSE
@@ -26,4 +26,5 @@ fun foo() {
// EXIST: var
// EXIST: when
// EXIST: while
// EXIST: typealias
// NOTHING_ELSE
@@ -39,4 +39,5 @@ var a : Int
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -26,4 +26,5 @@ annotation class Test {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -38,4 +38,5 @@ public class Test {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -32,4 +32,5 @@ class TestClass {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
+1
View File
@@ -20,4 +20,5 @@ fun foo() {
// EXIST: var
// EXIST: when
// EXIST: while
// EXIST: typealias
// NOTHING_ELSE
@@ -27,6 +27,7 @@ enum class Test {
// EXIST: const
// EXIST: suspend
// EXIST: fun
// EXIST: typealias
/* TODO: items below are not valid here */
// EXIST: class
@@ -28,4 +28,5 @@ interface Test {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -29,4 +29,5 @@ object Test {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -26,4 +26,5 @@ package Test
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -40,4 +40,5 @@ class Some {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -40,4 +40,5 @@ class Some {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
@@ -38,4 +38,5 @@ class Some {
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE
+1
View File
@@ -25,4 +25,5 @@
// EXIST: annotation class
// EXIST: const
// EXIST: suspend
// EXIST: typealias
// NOTHING_ELSE