Files
kotlin-fork/plugins/sam-with-receiver/testData/diagnostics/samWithoutAnnotation.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

21 lines
436 B
Kotlin
Vendored

// FIR_IDENTICAL
// FILE: Sam.java
public interface Sam {
String run(String a, String b);
}
// FILE: test.kt
fun test() {
Sam { a, b ->
System.out.println(a)
""
}
Sam <!TYPE_MISMATCH!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!>b<!> ->
val a = <!NO_THIS!>this@Sam<!>
System.out.<!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>)
""
}<!>
}