jextract: Translate Swift () -> () to java Runnable#820
Conversation
|
So this only does the FFM mode, could you also please do the JNI mode? Then also please make sure we have a runtime test -- i.e. a test in |
| methodName: String, | ||
| ) -> TranslatedParameter { | ||
| let parameterType = | ||
| if functionType.parameters.count == 0 && functionType.resultType.isVoid { |
There was a problem hiding this comment.
Can you extract this into some extractKnownJavaFunctionalInterfaceType(functionType)
it should return a JavaType? and if we get nil there we do the below branch.
There we'll also handle the other known types then, like supplier etc
|
Yeah samples broke: You can run them by |
I think we already have a test for Closures |
| $0.conversion.render(&printer, $0.parameters.first!.name) | ||
| } | ||
|
|
||
| let methodName = |
There was a problem hiding this comment.
I am still thinking of having a map to hold all names for functional interfaces 🤔
Translate the Swift function parameter type () -> () to the Java Runnable interface
Issue: #811