Add tests for SAM conversions
Add tests for KT-45191 [JPS] Marking method as "default" in Java SAM interface doesn't affect dependencies, which was fixed in intlellij(212): cbad0d91 support kotlin-generated lambda usage #KT-45191 Fixed
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
public interface SamInterface {
|
||||
void run();
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
public interface SamInterface {
|
||||
default void run() {}
|
||||
}
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/SamInterface.class
|
||||
End of files
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/SamInterface.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/UsageWithFunctionExpressionKt$sam$SamInterface$0.class
|
||||
out/production/module/UsageWithFunctionExpressionKt$usageWithFunctionExpression$a$1.class
|
||||
out/production/module/UsageWithFunctionExpressionKt.class
|
||||
out/production/module/UsageWithFunctionLiteralKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usageWithFunctionExpression.kt
|
||||
src/usageWithFunctionLiteral.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
Interface SamInterface does not have constructors
|
||||
Interface SamInterface does not have constructors
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun usageWithFunctionExpression() {
|
||||
val a = { println("Hi!") }
|
||||
SamInterface(a)
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun usageWithFunctionLiteral() {
|
||||
SamInterface { println("Hi!") }
|
||||
}
|
||||
Reference in New Issue
Block a user