[tests] Add test data for KT-49263
This commit is contained in:
committed by
Space Team
parent
2a257091fb
commit
9de8d020f1
@@ -0,0 +1,23 @@
|
||||
// ISSUE: KT-49263
|
||||
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
// IGNORE_BACKEND: ANY
|
||||
// REASON: red code (see corresponding diagnostic test)
|
||||
|
||||
fun box(): String {
|
||||
buildPostponedTypeVariable {
|
||||
consumeTargetType(this)
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class TargetType
|
||||
|
||||
fun consumeTargetType(value: TargetType) {}
|
||||
|
||||
fun <PTV> buildPostponedTypeVariable(block: PTV.() -> Unit): PTV {
|
||||
return (TargetType() as PTV).apply(block)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// ISSUE: KT-49263
|
||||
// CHECK_TYPE_WITH_EXACT
|
||||
|
||||
fun test() {
|
||||
val targetType = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildPostponedTypeVariable<!> {
|
||||
consumeTargetType(<!CANNOT_INFER_PARAMETER_TYPE!>this<!>)
|
||||
}
|
||||
// exact type equality check — turns unexpected compile-time behavior into red code
|
||||
// considered to be non-user-reproducible code for the purposes of these tests
|
||||
checkExactType<TargetType>(targetType)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class TargetType
|
||||
|
||||
fun consumeTargetType(value: TargetType) {}
|
||||
|
||||
fun <PTV> buildPostponedTypeVariable(block: PTV.() -> Unit): PTV {
|
||||
return null!!
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// ISSUE: KT-49263
|
||||
// CHECK_TYPE_WITH_EXACT
|
||||
|
||||
fun test() {
|
||||
val targetType = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildPostponedTypeVariable<!> {
|
||||
<!DEBUG_INFO_MISSING_UNRESOLVED!>consumeTargetType<!>(this)
|
||||
}
|
||||
// exact type equality check — turns unexpected compile-time behavior into red code
|
||||
// considered to be non-user-reproducible code for the purposes of these tests
|
||||
checkExactType<TargetType>(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>targetType<!>)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class TargetType
|
||||
|
||||
fun consumeTargetType(value: TargetType) {}
|
||||
|
||||
fun <PTV> buildPostponedTypeVariable(block: PTV.() -> Unit): PTV {
|
||||
return null!!
|
||||
}
|
||||
Reference in New Issue
Block a user