From 41e2deb751890dedff89e429f37ba2172da3dd99 Mon Sep 17 00:00:00 2001 From: Ilya Muradyan Date: Mon, 23 Aug 2021 11:11:52 +0300 Subject: [PATCH] Revert "[minor] Add the test confirming the wrong behavior of KT-48355" This reverts commit d9c0b9ad5a353a9b31844f1a08e61a38f1fe0fdb. --- .../ReplCompletionAndErrorsAnalysisTest.kt | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/plugins/scripting/scripting-ide-services-test/test/org/jetbrains/kotlin/scripting/ide_services/ReplCompletionAndErrorsAnalysisTest.kt b/plugins/scripting/scripting-ide-services-test/test/org/jetbrains/kotlin/scripting/ide_services/ReplCompletionAndErrorsAnalysisTest.kt index 3733cf9b89d..630752a1931 100644 --- a/plugins/scripting/scripting-ide-services-test/test/org/jetbrains/kotlin/scripting/ide_services/ReplCompletionAndErrorsAnalysisTest.kt +++ b/plugins/scripting/scripting-ide-services-test/test/org/jetbrains/kotlin/scripting/ide_services/ReplCompletionAndErrorsAnalysisTest.kt @@ -509,41 +509,6 @@ class ReplCompletionAndErrorsAnalysisTest : TestCase() { } } - @Test - fun testRequiresOptIn() = test { - // This test confirms the wrong behavior described in KT-48355 - - // This compilation is here to initialize the compiler without RequiresOptIn option. - // If you remove it, warning disappears. - run { - code = "1" - doCompile - } - - run { - code = """ - import kotlin.time.* - @OptIn(ExperimentalTime::class) - val mark = TimeSource.Monotonic.markNow() - """.trimIndent() - - compilationConfiguration = ScriptCompilationConfiguration { - compilerOptions("-Xopt-in=kotlin.RequiresOptIn") - } - - doErrorCheck - - expect { - // This warning is a wrong behavior, it should pass away after fixing KT-48355 - addError( - 2, 2, 2, 7, - "This class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'", - "WARNING" - ) - } - } - } - private val setupDefaultImportsCompletionRun: TestRunConfigurator = { compilationConfiguration = ScriptCompilationConfiguration { defaultImports(listOf("kotlin.math.atan"))