Files
kotlin-fork/plugins/sam-with-receiver/testData/diagnostics/samWithAnnotation.kt
T
Dmitriy Novozhilov 49c836e706 [SAM with receiver] Partially migrate tests to new infrastructure
Script tests still use old infrastructure, because there is no support
  for them in new framework
2022-06-27 08:11:33 +00:00

24 lines
434 B
Kotlin
Vendored

// FIR_IDENTICAL
// FILE: Sam.java
@SamWithReceiver
public interface Sam {
String run(String a, String b);
}
// FILE: test.kt
annotation class SamWithReceiver
fun test() {
Sam <!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)
""
}
}