05ca001310
It would be more consistently to prohibit the behavior from the unmuted test (see KT-52428), but it was decided to postpone the breaking change. Unfortunately, it didn't work to make a test where for computing star projections we would need to substitute other type parameters because effectively, it's not allowed to have SAM conversion when star projections/wildcard is based on a type parameter which bounds use other type parameters. ^KT-53552 In progress
24 lines
941 B
Plaintext
Vendored
24 lines
941 B
Plaintext
Vendored
fun test() {
|
|
var a: SomeJavaClass<out String> = SomeJavaClass<String>()
|
|
a.someFunction(hello = local fun <anonymous>(it: @FlexibleNullability String?) {
|
|
return Unit
|
|
}
|
|
/*-> @FlexibleNullability Hello<out @FlexibleNullability String?>? */)
|
|
a.plus(hello = local fun <anonymous>(it: @FlexibleNullability String?) {
|
|
return Unit
|
|
}
|
|
/*-> @FlexibleNullability Hello<out @FlexibleNullability String?>? */) /*~> Unit */
|
|
a.get(hello = local fun <anonymous>(it: @FlexibleNullability String?) {
|
|
return Unit
|
|
}
|
|
/*-> @FlexibleNullability Hello<out @FlexibleNullability String?>? */)
|
|
a = a.plus(hello = local fun <anonymous>(it: @FlexibleNullability String?) {
|
|
return Unit
|
|
}
|
|
/*-> @FlexibleNullability Hello<out @FlexibleNullability String?>? */)
|
|
a.set(i = 0, hello = local fun <anonymous>(it: @FlexibleNullability String?) {
|
|
return Unit
|
|
}
|
|
/*-> @FlexibleNullability Hello<out @FlexibleNullability String?>? */)
|
|
}
|