From 27615209edc50776a59743fd986b0a750de8694d Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Fri, 15 Sep 2017 10:39:23 +0300 Subject: [PATCH] Migration to expect/actual: remove header/impl from completion, tests --- .../org/jetbrains/kotlin/idea/completion/KeywordCompletion.kt | 2 +- idea/idea-completion/testData/keywords/AfterClassProperty.kt | 4 ++-- idea/idea-completion/testData/keywords/AfterClasses.kt | 4 ++-- idea/idea-completion/testData/keywords/AfterFuns.kt | 4 ++-- idea/idea-completion/testData/keywords/BeforeClass.kt | 1 + .../testData/keywords/GlobalPropertyAccessors.kt | 4 ++-- .../testData/keywords/InAnnotationClassScope.kt | 4 ++-- idea/idea-completion/testData/keywords/InClassBeforeFun.kt | 4 ++-- idea/idea-completion/testData/keywords/InClassScope.kt | 4 ++-- idea/idea-completion/testData/keywords/InEnumScope2.kt | 4 ++-- idea/idea-completion/testData/keywords/InInterfaceScope.kt | 4 ++-- idea/idea-completion/testData/keywords/InObjectScope.kt | 4 ++-- .../testData/keywords/InPrimaryConstructorParametersList.kt | 2 +- .../testData/keywords/InTopScopeAfterPackage.kt | 4 ++-- idea/idea-completion/testData/keywords/PropertyAccessors.kt | 4 ++-- idea/idea-completion/testData/keywords/PropertyAccessors2.kt | 4 ++-- idea/idea-completion/testData/keywords/PropertySetter.kt | 4 ++-- idea/idea-completion/testData/keywords/TopScope.kt | 4 ++-- 18 files changed, 33 insertions(+), 32 deletions(-) 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 a1bb84311e2..4146d92bfee 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 @@ -422,7 +422,7 @@ object KeywordCompletion { private fun isModifierSupportedAtLanguageLevel(keyword: KtKeywordToken, languageVersionSettings: LanguageVersionSettings): Boolean { val feature = when (keyword) { KtTokens.TYPE_ALIAS_KEYWORD -> LanguageFeature.TypeAliases - KtTokens.HEADER_KEYWORD, KtTokens.IMPL_KEYWORD, + KtTokens.HEADER_KEYWORD, KtTokens.IMPL_KEYWORD -> return false KtTokens.EXPECT_KEYWORD, KtTokens.ACTUAL_KEYWORD -> LanguageFeature.MultiPlatformProjects KtTokens.SUSPEND_KEYWORD -> LanguageFeature.Coroutines else -> return true diff --git a/idea/idea-completion/testData/keywords/AfterClassProperty.kt b/idea/idea-completion/testData/keywords/AfterClassProperty.kt index 15bec318ffb..5f419b549f7 100644 --- a/idea/idea-completion/testData/keywords/AfterClassProperty.kt +++ b/idea/idea-completion/testData/keywords/AfterClassProperty.kt @@ -42,6 +42,6 @@ class MouseMovedEventArgs // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/AfterClasses.kt b/idea/idea-completion/testData/keywords/AfterClasses.kt index 1d3bef6f5c3..26453ab3aef 100644 --- a/idea/idea-completion/testData/keywords/AfterClasses.kt +++ b/idea/idea-completion/testData/keywords/AfterClasses.kt @@ -36,6 +36,6 @@ class B { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/AfterFuns.kt b/idea/idea-completion/testData/keywords/AfterFuns.kt index fde2d452207..327751a170c 100644 --- a/idea/idea-completion/testData/keywords/AfterFuns.kt +++ b/idea/idea-completion/testData/keywords/AfterFuns.kt @@ -41,6 +41,6 @@ class A { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/BeforeClass.kt b/idea/idea-completion/testData/keywords/BeforeClass.kt index 0a1e452e19e..be801ad2072 100644 --- a/idea/idea-completion/testData/keywords/BeforeClass.kt +++ b/idea/idea-completion/testData/keywords/BeforeClass.kt @@ -3,4 +3,5 @@ eclass A { // EXIST: enum // EXIST: external +// EXIST: expect // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt b/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt index fc693aadd71..a519c1d6489 100644 --- a/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt +++ b/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt @@ -40,6 +40,6 @@ var a : Int // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt b/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt index 2df8341ad90..fbbf11b20a3 100644 --- a/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt +++ b/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt @@ -27,6 +27,6 @@ annotation class Test { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InClassBeforeFun.kt b/idea/idea-completion/testData/keywords/InClassBeforeFun.kt index 35fd5907135..03678180016 100644 --- a/idea/idea-completion/testData/keywords/InClassBeforeFun.kt +++ b/idea/idea-completion/testData/keywords/InClassBeforeFun.kt @@ -39,6 +39,6 @@ public class Test { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InClassScope.kt b/idea/idea-completion/testData/keywords/InClassScope.kt index c9c61c0ea52..a801ea3d043 100644 --- a/idea/idea-completion/testData/keywords/InClassScope.kt +++ b/idea/idea-completion/testData/keywords/InClassScope.kt @@ -33,6 +33,6 @@ class TestClass { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InEnumScope2.kt b/idea/idea-completion/testData/keywords/InEnumScope2.kt index 278b41af66e..a811009c077 100644 --- a/idea/idea-completion/testData/keywords/InEnumScope2.kt +++ b/idea/idea-completion/testData/keywords/InEnumScope2.kt @@ -28,8 +28,8 @@ enum class Test { // EXIST: suspend // EXIST: fun // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual /* 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 4edc96079c4..8ad16dec5e2 100644 --- a/idea/idea-completion/testData/keywords/InInterfaceScope.kt +++ b/idea/idea-completion/testData/keywords/InInterfaceScope.kt @@ -29,6 +29,6 @@ interface Test { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InObjectScope.kt b/idea/idea-completion/testData/keywords/InObjectScope.kt index eaee53418cf..6ba8990a825 100644 --- a/idea/idea-completion/testData/keywords/InObjectScope.kt +++ b/idea/idea-completion/testData/keywords/InObjectScope.kt @@ -30,6 +30,6 @@ object Test { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt b/idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt index f2be4158b02..bd6e56ffef5 100644 --- a/idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt +++ b/idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt @@ -14,7 +14,7 @@ class TestSample() // EXIST: private // EXIST: protected // EXIST: internal -// EXIST: impl +// EXIST: actual /* TODO: keywords below should not be here*/ // EXIST: abstract // EXIST: const diff --git a/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt b/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt index d77855dd56c..b80f69927d4 100644 --- a/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt +++ b/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt @@ -27,6 +27,6 @@ package Test // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/PropertyAccessors.kt b/idea/idea-completion/testData/keywords/PropertyAccessors.kt index 3865c0f270e..69615cfecaa 100644 --- a/idea/idea-completion/testData/keywords/PropertyAccessors.kt +++ b/idea/idea-completion/testData/keywords/PropertyAccessors.kt @@ -41,6 +41,6 @@ class Some { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/PropertyAccessors2.kt b/idea/idea-completion/testData/keywords/PropertyAccessors2.kt index 8594fb935cc..2072defdf1d 100644 --- a/idea/idea-completion/testData/keywords/PropertyAccessors2.kt +++ b/idea/idea-completion/testData/keywords/PropertyAccessors2.kt @@ -41,6 +41,6 @@ class Some { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/PropertySetter.kt b/idea/idea-completion/testData/keywords/PropertySetter.kt index 30c373a93c6..0ba3c5c3b84 100644 --- a/idea/idea-completion/testData/keywords/PropertySetter.kt +++ b/idea/idea-completion/testData/keywords/PropertySetter.kt @@ -39,6 +39,6 @@ class Some { // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE diff --git a/idea/idea-completion/testData/keywords/TopScope.kt b/idea/idea-completion/testData/keywords/TopScope.kt index fd5bef074aa..4ae103601a4 100644 --- a/idea/idea-completion/testData/keywords/TopScope.kt +++ b/idea/idea-completion/testData/keywords/TopScope.kt @@ -26,6 +26,6 @@ // EXIST: const // EXIST: suspend // EXIST: typealias -// EXIST: header -// EXIST: impl +// EXIST: expect +// EXIST: actual // NOTHING_ELSE