Fix common super type calculation for captured dynamic types
^KT-32499 Fixed
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
// SKIP_TXT
|
||||
|
||||
fun case_1(vararg args: dynamic) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf(null) + args<!>).toTypedArray()
|
||||
}
|
||||
|
||||
fun case_2(vararg args: dynamic) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf<Nothing>() + args<!>).toTypedArray()
|
||||
}
|
||||
|
||||
fun case_3(vararg args: dynamic) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf(1) + args<!>).toTypedArray()
|
||||
}
|
||||
|
||||
fun case_4(vararg args: dynamic) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf<Any?>() + args<!>).toTypedArray()
|
||||
}
|
||||
|
||||
fun case_5(x: Any?) {
|
||||
fun foo(x: List<dynamic>) = x
|
||||
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf(null) + x as MutableList<out dynamic><!>)
|
||||
}
|
||||
|
||||
fun case_6(x: Any?) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<kotlin.Any?>")!>listOf(null) + x as MutableList<in dynamic><!>).toTypedArray()
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// SKIP_TXT
|
||||
|
||||
fun case_1(vararg args: dynamic) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf(null) + args<!>).toTypedArray()
|
||||
}
|
||||
|
||||
fun case_2(vararg args: dynamic) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf<Nothing>() + args<!>).toTypedArray()
|
||||
}
|
||||
|
||||
fun case_3(vararg args: dynamic) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf(1) + args<!>).toTypedArray()
|
||||
}
|
||||
|
||||
fun case_4(vararg args: dynamic) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf<Any?>() + args<!>).toTypedArray()
|
||||
}
|
||||
|
||||
fun case_5(x: Any?) {
|
||||
fun foo(x: List<dynamic>) = x
|
||||
|
||||
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<dynamic>")!>listOf(null) + x as MutableList<out dynamic><!>)
|
||||
}
|
||||
|
||||
fun case_6(x: Any?) {
|
||||
(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<kotlin.Any?>")!>listOf(null) + x as MutableList<in dynamic><!>).toTypedArray()
|
||||
}
|
||||
Reference in New Issue
Block a user