Minor. Replace '== JvmPlatform' with 'is JvmPlatform'

This commit is contained in:
Denis Zharkov
2016-04-01 12:39:36 +03:00
parent e2db5d9a01
commit e97fa929ea
3 changed files with 5 additions and 5 deletions
@@ -29,7 +29,7 @@ object AnalyzerFacadeProvider {
// otherwise we would be forced to add casts on the call site of setupResolverForProject
fun getAnalyzerFacade(targetPlatform: TargetPlatform): AnalyzerFacade<JvmPlatformParameters> {
return when (targetPlatform) {
JvmPlatform -> JvmAnalyzerFacade
is JvmPlatform -> JvmAnalyzerFacade
JsPlatform -> JsAnalyzerFacade
else -> throw IllegalArgumentException("Unsupported platform: $targetPlatform")
}
@@ -140,7 +140,7 @@ object ExpectedCompletionUtils {
fun itemsShouldExist(fileText: String, platform: TargetPlatform?): Array<CompletionProposal> {
return when (platform) {
JvmPlatform -> processProposalAssertions(fileText, EXIST_LINE_PREFIX, EXIST_JAVA_ONLY_LINE_PREFIX)
is JvmPlatform -> processProposalAssertions(fileText, EXIST_LINE_PREFIX, EXIST_JAVA_ONLY_LINE_PREFIX)
JsPlatform -> processProposalAssertions(fileText, EXIST_LINE_PREFIX, EXIST_JS_ONLY_LINE_PREFIX)
null -> processProposalAssertions(fileText, EXIST_LINE_PREFIX)
else -> throw IllegalArgumentException(UNSUPPORTED_PLATFORM_MESSAGE)
@@ -149,7 +149,7 @@ object ExpectedCompletionUtils {
fun itemsShouldAbsent(fileText: String, platform: TargetPlatform?): Array<CompletionProposal> {
return when (platform) {
JvmPlatform -> processProposalAssertions(fileText, ABSENT_LINE_PREFIX, ABSENT_JAVA_LINE_PREFIX, EXIST_JS_ONLY_LINE_PREFIX)
is JvmPlatform -> processProposalAssertions(fileText, ABSENT_LINE_PREFIX, ABSENT_JAVA_LINE_PREFIX, EXIST_JS_ONLY_LINE_PREFIX)
JsPlatform -> processProposalAssertions(fileText, ABSENT_LINE_PREFIX, ABSENT_JS_LINE_PREFIX, EXIST_JAVA_ONLY_LINE_PREFIX)
null -> processProposalAssertions(fileText, ABSENT_LINE_PREFIX)
else -> throw IllegalArgumentException(UNSUPPORTED_PLATFORM_MESSAGE)
@@ -185,7 +185,7 @@ object ExpectedCompletionUtils {
fun getExpectedNumber(fileText: String, platform: TargetPlatform?): Int? {
return when (platform) {
null -> InTextDirectivesUtils.getPrefixedInt(fileText, NUMBER_LINE_PREFIX)
JvmPlatform -> getPlatformExpectedNumber(fileText, NUMBER_JAVA_LINE_PREFIX)
is JvmPlatform -> getPlatformExpectedNumber(fileText, NUMBER_JAVA_LINE_PREFIX)
JsPlatform -> getPlatformExpectedNumber(fileText, NUMBER_JS_LINE_PREFIX)
else -> throw IllegalArgumentException(UNSUPPORTED_PLATFORM_MESSAGE)
}
@@ -60,6 +60,6 @@ class ConfigureKotlinJsInProjectAction: ConfigureKotlinInProjectAction() {
class ConfigureKotlinJavaInProjectAction: ConfigureKotlinInProjectAction() {
override fun getApplicableConfigurators(project: Project) = getAbleToRunConfigurators(project).filter {
it.targetPlatform == JvmPlatform
it.targetPlatform is JvmPlatform
}
}