[FIR] Report friendly errors for type aliases from stdlib if -no-jdk option is set

^KT-54531 Fixed
This commit is contained in:
Ivan Kochurkin
2022-11-22 23:20:50 +01:00
committed by Space Team
parent 8eeb7e2631
commit 879deb90fc
5 changed files with 25 additions and 3 deletions
@@ -0,0 +1,6 @@
$TESTDATA_DIR$/firFriendlyErrorIfNoJdkOptionIsSet.kt
-language-version
2.0
-d
$TEMP_DIR$
-no-jdk
@@ -0,0 +1,3 @@
fun main() {
throw NullPointerException()
}
@@ -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/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: unresolved reference: NullPointerException
throw NullPointerException()
^
compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is ERROR CLASS: Unresolved name: NullPointerException but kotlin/Throwable was expected
throw NullPointerException()
^
COMPILATION_ERROR