Skip to content

Commit

Permalink
Disable platform-specific checkers in common
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavvinov committed Nov 25, 2019
1 parent 42ac850 commit a5b1775
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package org.jetbrains.kotlin.idea.project

import org.jetbrains.kotlin.caches.resolve.CompositeAnalyzerServices
import org.jetbrains.kotlin.analyzer.common.CommonPlatformAnalyzerServices
import org.jetbrains.kotlin.js.resolve.JsPlatformAnalyzerServices
import org.jetbrains.kotlin.platform.SimplePlatform
import org.jetbrains.kotlin.platform.TargetPlatform
Expand All @@ -21,7 +21,7 @@ import java.lang.IllegalStateException
val TargetPlatform.findAnalyzerServices: PlatformDependentAnalyzerServices
get() =
when {
isCommon() -> CompositeAnalyzerServices(this.componentPlatforms.map { it.findAnalyzerServices })
isCommon() -> CommonPlatformAnalyzerServices
else -> single().findAnalyzerServices
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ class A : (Int) -> Int
fun `name in backticks`() {}

// Array as upper bound isn't allowed on JVM
class B<<!UPPER_BOUND_CANNOT_BE_ARRAY!>T : Array<*><!>>
class B<T : Array<*>>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// !DIAGNOSTICS: -ABSTRACT_MEMBER_NOT_IMPLEMENTED

// Implementing kotlin functions isn't allowed on JS
class <!IMPLEMENTING_FUNCTION_INTERFACE!>A<!> : (Int) -> Int
class A : (Int) -> Int

// Array as upper bound isn't allowed on JVM
class B<<!UPPER_BOUND_CANNOT_BE_ARRAY!>T : Array<*><!>>
class B<T : Array<*>>

0 comments on commit a5b1775

Please sign in to comment.