Implement tests map generator and refactor folder structure to spec tests linking
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
// WITH_RUNTIME
|
||||
/*
|
||||
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-draft
|
||||
* PLACE: type-system, introduction -> paragraph 5 -> sentence 2
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class.
|
||||
* NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-26947
|
||||
*/
|
||||
|
||||
val map = mapOf("x" to null)
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
val x: Int by mapOf("x" to null)
|
||||
} catch (e: KotlinNullPointerException) {
|
||||
return "OK"
|
||||
} catch (e: NullPointerException) {
|
||||
return "OK"
|
||||
}
|
||||
try {
|
||||
val x: Any by map
|
||||
} catch (e: KotlinNullPointerException) {
|
||||
return "OK"
|
||||
} catch (e: NullPointerException) {
|
||||
return "OK"
|
||||
}
|
||||
return "Error"
|
||||
}
|
||||
Reference in New Issue
Block a user