[FIR] Implement VERSION_REQUIREMENT_DEPRECATION diagnostics

This commit is contained in:
Kirill Rakhman
2023-08-04 17:20:49 +02:00
committed by Space Team
parent 65ea9697ab
commit 09f895efe6
23 changed files with 285 additions and 55 deletions
@@ -0,0 +1,7 @@
$TESTDATA_DIR$/requireKotlinCompilerVersion.kt
-classpath
$TESTDATA_DIR$/requireKotlinCompilerVersion
-d
$TEMP_DIR$
-language-version
2.0
@@ -0,0 +1,8 @@
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
compiler/testData/cli/jvm/requireKotlinCompilerVersion.kt:12:8: error: 'class Foo : Any' is only available since Kotlin 9.9.90 and cannot be used in Kotlin $VERSION$.
import test.access.Foo
^
compiler/testData/cli/jvm/requireKotlinCompilerVersion.kt:15:5: error: 'constructor(): Foo' is only available since Kotlin 9.9.90 and cannot be used in Kotlin $VERSION$.
Foo()
^
COMPILATION_ERROR
@@ -1,5 +1,8 @@
// !LANGUAGE: +TypeAliases
// !API_VERSION: 1.0
// IGNORE_DIAGNOSTIC_API
// IGNORE_REVERSED_RESOLVE
// ^KT-60996
// FILE: test.kt
val fooException = Exception("foo")
val barException = kotlin.Exception("bar")
val fooException = <!API_NOT_AVAILABLE!>Exception<!>("foo")
val barException = kotlin.<!API_NOT_AVAILABLE!>Exception<!>("bar")
@@ -1,5 +1,8 @@
// !LANGUAGE: +TypeAliases
// !API_VERSION: 1.0
// IGNORE_DIAGNOSTIC_API
// IGNORE_REVERSED_RESOLVE
// ^KT-60996
// FILE: test.kt
val fooException = Exception("foo")
val barException = kotlin.<!UNRESOLVED_REFERENCE!>Exception<!>("bar")