Depend on passed language version explicitly to compute nullability annotation settings
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-language-version
|
||||
1.5
|
||||
$TESTDATA_DIR$/jspecifyUsage.kt
|
||||
$TESTDATA_DIR$/jspecify
|
||||
$FOREIGN_ANNOTATIONS_DIR$
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1,7 @@
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: warning: type mismatch: inferred type is Nothing? but String was expected
|
||||
a.foo(null)
|
||||
^
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:3:5: warning: unsafe use of a nullable receiver of type String?
|
||||
a.bar().hashCode()
|
||||
^
|
||||
OK
|
||||
@@ -0,0 +1,7 @@
|
||||
-language-version
|
||||
1.6
|
||||
$TESTDATA_DIR$/jspecifyUsage.kt
|
||||
$TESTDATA_DIR$/jspecify
|
||||
$FOREIGN_ANNOTATIONS_DIR$
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1,5 @@
|
||||
warning: language version 1.6 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null can not be a value of a non-null type String
|
||||
a.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user