mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
24 lines
504 B
Kotlin
Vendored
24 lines
504 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER,-UNUSED_VARIABLE
|
|
|
|
// FILE: Sam.java
|
|
@SamWithReceiver
|
|
public interface Sam {
|
|
String run(String a, String b);
|
|
}
|
|
|
|
// FILE: test.kt
|
|
annotation class SamWithReceiver
|
|
|
|
fun test() {
|
|
Sam <!NI;TYPE_MISMATCH!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!>a, <!CANNOT_INFER_PARAMETER_TYPE!>b<!><!> ->
|
|
System.out.println(a)
|
|
""
|
|
}<!>
|
|
|
|
Sam { b ->
|
|
val a: String = this
|
|
System.out.println(a)
|
|
""
|
|
}
|
|
} |