Keyword completion: do not suggest const except inside top level or object

#KT-23026 Fixed
#KT-29840 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-02-15 18:48:24 +09:00
committed by Alexander Podkhalyuzin
parent 7d809bc1d5
commit 8cdf901538
14 changed files with 28 additions and 12 deletions
@@ -0,0 +1,4 @@
class Foo <caret> {
}
// EXIST: constructor
@@ -39,7 +39,6 @@ class MouseMovedEventArgs
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect
-1
View File
@@ -38,7 +38,6 @@ class A {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect
@@ -24,7 +24,6 @@ annotation class Test {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect
@@ -36,7 +36,6 @@ public class Test {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect
@@ -30,7 +30,6 @@ class TestClass {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect
@@ -24,7 +24,6 @@ enum class Test {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: fun
// EXIST: typealias
@@ -26,7 +26,6 @@ interface Test {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect
@@ -17,6 +17,5 @@ class TestSample(<caret>)
// EXIST: actual
/* TODO: keywords below should not be here*/
// EXIST: abstract
// EXIST: const val
// EXIST: lateinit var
// NOTHING_ELSE
@@ -38,7 +38,6 @@ class Some {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect
@@ -38,7 +38,6 @@ class Some {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect
@@ -36,7 +36,6 @@ class Some {
// EXIST: tailrec
// EXIST: external
// EXIST: annotation class
// EXIST: const val
// EXIST: suspend
// EXIST: typealias
// EXIST: expect