mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
20 lines
597 B
Kotlin
20 lines
597 B
Kotlin
package a
|
|
|
|
class MyClass {
|
|
fun component1(<!UNUSED_PARAMETER!>i<!>: Int) {}
|
|
}
|
|
|
|
class MyClass2 {}
|
|
|
|
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1()<!> = 1.2
|
|
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1()<!> = 1.3
|
|
|
|
fun test(mc1: MyClass, mc2: MyClass2) {
|
|
val (a, b) = <!COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>mc1<!>
|
|
val (c) = <!COMPONENT_FUNCTION_AMBIGUITY!>mc2<!>
|
|
|
|
//a,b,c are error types
|
|
use(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>, <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>b<!>, <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>c<!>)
|
|
}
|
|
|
|
fun use(vararg a: Any?) = a |