Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
2a568be17b8f4a9af8f61b27d156c07d37c12fdc
/
.
/
compiler
/
testData
/
diagnostics
/
tests
/
GenericFunctionIsLessSpecific.kt
blob: a6fd664e0ec0d7854750be49cf422f681b64f6da [
file
]
// FIR_IDENTICAL
// !CHECK_TYPE
// A generic funciton is always less specific than a non-generic one
fun
<
T
>
foo
(
t
:
T
)
:
Unit
{}
fun foo
(
i
:
Int
)
:
Int
=
1
fun test
()
{
checkSubtype
<
Int
>(
foo
(
1
))
checkSubtype
<
Unit
>(
foo
(
"s"
))
}