// SKIP_TXT

/*
 * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
 *
 * SPEC VERSION: 0.1-100
 * MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
 * NUMBER: 4
 * DESCRIPTION: Type checking (comparison with invalid types) of too a big integers.
 * HELPERS: checkType
 */

// TESTCASE NUMBER: 1
fun case_1() {
    checkSubtype<Long>(-<!INT_LITERAL_OUT_OF_RANGE!>9223372036854775808L<!>)
    -<!INT_LITERAL_OUT_OF_RANGE!>9223372036854775808L<!> <!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>check<!><<!CANNOT_INFER_PARAMETER_TYPE!>Long<!>>() }

    checkSubtype<Long>(<!INT_LITERAL_OUT_OF_RANGE!>9223372036854775808L<!>)
    <!INT_LITERAL_OUT_OF_RANGE!>9223372036854775808L<!> <!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>check<!><<!CANNOT_INFER_PARAMETER_TYPE!>Long<!>>() }
}

// TESTCASE NUMBER: 2
fun case_2() {
    checkSubtype<Long>(<!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000L<!>)
    <!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000L<!> <!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>check<!><<!CANNOT_INFER_PARAMETER_TYPE!>Long<!>>() }

    checkSubtype<Long>(<!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000l<!>)
    <!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000l<!> <!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>check<!><<!CANNOT_INFER_PARAMETER_TYPE!>Long<!>>() }

    checkSubtype<Long>(-<!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000L<!>)
    -<!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000L<!> <!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>check<!><<!CANNOT_INFER_PARAMETER_TYPE!>Long<!>>() }

    checkSubtype<Long>(-<!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000l<!>)
    -<!INT_LITERAL_OUT_OF_RANGE!>100000000000000000000000000000000l<!> <!CANNOT_INFER_PARAMETER_TYPE, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>check<!><<!CANNOT_INFER_PARAMETER_TYPE!>Long<!>>() }
}
