[Tests] Add test for vararg callable reference adaption with typealias
#KT-65817 Fixed
This commit is contained in:
committed by
Space Team
parent
365973f03a
commit
9606a5a441
Vendored
+11
@@ -1,6 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun foo(vararg ints: Int) {}
|
||||
|
||||
typealias MyInt = Int
|
||||
fun fooAlias(vararg ints: MyInt) {}
|
||||
|
||||
fun test(i: IntArray) {
|
||||
myLet(i, ::foo)
|
||||
myLet(::foo)
|
||||
@@ -8,6 +12,13 @@ fun test(i: IntArray) {
|
||||
myLet<IntArray>(::foo)
|
||||
myLetExplicit1(::foo)
|
||||
myLetExplicit2(::foo)
|
||||
|
||||
myLet(i, ::fooAlias)
|
||||
myLet(::fooAlias)
|
||||
myLet<Int>(<!TYPE_MISMATCH!>::fooAlias<!>)
|
||||
myLet<IntArray>(::fooAlias)
|
||||
myLetExplicit1(::fooAlias)
|
||||
myLetExplicit2(::fooAlias)
|
||||
}
|
||||
|
||||
fun <T> myLet(t: T, block: (T) -> Unit) {}
|
||||
|
||||
Reference in New Issue
Block a user