blob: 69d939f9922f10d4e08d9cd20777845ddbdd4835 [file]
// RUN_PIPELINE_TILL: FRONTEND
// 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"))
}
/* GENERATED_FIR_TAGS: classDeclaration, funWithExtensionReceiver, functionDeclaration, functionalType, infix,
integerLiteral, nullableType, stringLiteral, typeParameter, typeWithExtension */