// LANGUAGE: +ExpectRefinement
// WITH_STDLIB
// RUN_PIPELINE_TILL: BACKEND
// MODULE: common
expect class <!PACKAGE_OR_CLASSIFIER_REDECLARATION{JVM;JVM;JVM}!>Foo<!> {
    fun foo()
}

// MODULE: intermediate1()()(common)
<!OPT_IN_WITHOUT_ARGUMENTS, OPT_IN_WITHOUT_ARGUMENTS{JVM}!>@OptIn(<!ANNOTATION_ARGUMENT_MUST_BE_CONST, ANNOTATION_ARGUMENT_MUST_BE_CONST{JVM}!><!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE{JVM}!>ExperimentalMultiplatform<!>::class<!>)<!>
@kotlin.<!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE{JVM}!>experimental<!>.<!DEBUG_INFO_MISSING_UNRESOLVED, DEBUG_INFO_MISSING_UNRESOLVED{JVM}!>ExpectRefinement<!>
expect class <!PACKAGE_OR_CLASSIFIER_REDECLARATION, PACKAGE_OR_CLASSIFIER_REDECLARATION{JVM;JVM}!>Foo<!> {
    fun foo()
    fun bar()
}

// MODULE: intermediate2()()(intermediate1)
<!OPT_IN_WITHOUT_ARGUMENTS!>@OptIn(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!><!UNRESOLVED_REFERENCE!>ExperimentalMultiplatform<!>::class<!>)<!>
@kotlin.<!UNRESOLVED_REFERENCE!>experimental<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>ExpectRefinement<!>
expect class <!PACKAGE_OR_CLASSIFIER_REDECLARATION, PACKAGE_OR_CLASSIFIER_REDECLARATION{JVM}!>Foo<!> {
    fun foo()
    fun bar()
    fun baz()
}

// MODULE: main()()(intermediate2)
actual class <!AMBIGUOUS_EXPECTS, PACKAGE_OR_CLASSIFIER_REDECLARATION!>Foo<!> {
    actual fun foo() {}
    actual fun bar() {}
    actual fun baz() {}
}

/* GENERATED_FIR_TAGS: actual, classDeclaration, classReference, expect, functionDeclaration */
