I assume the compiler initially sees the first block definition and assumes it’s a RTL.String, which generates this error as it parses the 2nd chunk of the __partial class? I can work around the issue by importing Foundation in my shared project.
This reproduces the issue. It seems that as soon as I import Foundation (or some framework that imports Foundation) in the Silver/Toffee project, the error occurs.
Getting a similar issue when the class is defined as such:
In shared project:
public class A {
private var someHandler: ((String, String, Int) -> Void)?
}
in Cocoa dylib project:
public __partial class A {
func someFunction(handler: (String, String, Int) -> Void) {
someHandler = handler
}
}
This goes away if I import Foundation in the shared project. There’s something different happening with closures (Carlo mentioned an issue in a private discussion last night but I don’t know if this is what he was referring to).