Dev: fix wrong typealias
This commit is contained in:
parent
f35a70b3ad
commit
0d2bd2b6a8
|
@ -6,7 +6,7 @@ import Foundation
|
|||
import java_swift
|
||||
import CJavaVM
|
||||
|
||||
public typealias JavaEncodableClosure = (Encodable) throws -> jobject
|
||||
public typealias JavaEncodableClosure = (Any) throws -> jobject
|
||||
public typealias JavaDecodableClosure = (jobject) throws -> Decodable
|
||||
|
||||
public struct JavaCoderConfig {
|
||||
|
|
|
@ -522,7 +522,7 @@ extension JavaEncoder {
|
|||
let anyCodableValue = value as! AnyCodable
|
||||
if let javaClassname = JavaCoderConfig.codableClassNames[anyCodableValue.typeName] {
|
||||
let encodableClosure = JavaCoderConfig.encodableClosures[anyCodableValue.typeName]!
|
||||
let javaObject = try encodableClosure(anyCodableValue.value as! Encodable)
|
||||
let javaObject = try encodableClosure(anyCodableValue.value)
|
||||
storage = JNIStorageObject(type: .object(className: javaClassname), javaObject: javaObject)
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue