When bringing in java.util.ArrayList in a target that depends on JavaKitFunction, we end up with this ill-formed method:
@JavaMethod
public func toArray(_ arg0: JavaIntFunction<[JavaObject?]>?) -> [JavaObject?]
which produces this error:
error: type '[JavaObject?]' does not conform to protocol 'AnyJavaObject'
We need to realize when we are within a context where we must have a Java class, not its bridged value type, and use that Java class. This also means bringing java.lang.String and java.lang.Array into Swift as classes as well.
When bringing in
java.util.ArrayList
in a target that depends on JavaKitFunction, we end up with this ill-formed method:which produces this error:
We need to realize when we are within a context where we must have a Java class, not its bridged value type, and use that Java class. This also means bringing
java.lang.String
andjava.lang.Array
into Swift as classes as well.