Check for backend when checking for suspend in fun interfaces
This commit is contained in:
+7
-1
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.test.builders
|
||||
|
||||
import org.jetbrains.kotlin.config.*
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives
|
||||
import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives
|
||||
import org.jetbrains.kotlin.test.directives.model.singleOrZeroValue
|
||||
@@ -49,7 +50,11 @@ class LanguageVersionSettingsBuilder {
|
||||
analysisFlags[flag] = value
|
||||
}
|
||||
|
||||
fun configureUsingDirectives(directives: RegisteredDirectives, environmentConfigurators: List<EnvironmentConfigurator>) {
|
||||
fun configureUsingDirectives(
|
||||
directives: RegisteredDirectives,
|
||||
environmentConfigurators: List<EnvironmentConfigurator>,
|
||||
targetBackend: TargetBackend?
|
||||
) {
|
||||
val apiVersion = directives.singleOrZeroValue(LanguageSettingsDirectives.API_VERSION)
|
||||
if (apiVersion != null) {
|
||||
this.apiVersion = apiVersion
|
||||
@@ -69,6 +74,7 @@ class LanguageVersionSettingsBuilder {
|
||||
analysisFlag(JvmAnalysisFlags.inheritMultifileParts, trueOrNull(LanguageSettingsDirectives.INHERIT_MULTIFILE_PARTS in directives)),
|
||||
analysisFlag(JvmAnalysisFlags.sanitizeParentheses, trueOrNull(LanguageSettingsDirectives.SANITIZE_PARENTHESES in directives)),
|
||||
analysisFlag(JvmAnalysisFlags.enableJvmPreview, trueOrNull(LanguageSettingsDirectives.ENABLE_JVM_PREVIEW in directives)),
|
||||
analysisFlag(JvmAnalysisFlags.useIR, targetBackend == TargetBackend.JVM_IR || targetBackend == null),
|
||||
|
||||
analysisFlag(AnalysisFlags.explicitApiVersion, trueOrNull(apiVersion != null)),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user