Created
September 23, 2016 21:42
-
-
Save tjw/ebdd2d9da6ee2ea413a22c469132802c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/* | |
xcrun swift objc-throwing-block.swift | |
objc-throwing-block.swift:20:13: error: method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C | |
@objc func access(accessor: Accessor) {} | |
^ | |
objc-throwing-block.swift:20:30: note: throwing function types cannot be represented in Objective-C | |
@objc func access(accessor: Accessor) {} | |
^~~~~~~~ | |
*/ | |
// I would expect this to get turned into something like `BOOL (^)(NSURL *, NSError **outError) | |
typealias Accessor = (URL) throws -> Void | |
@objc class Foo : NSObject { | |
@objc func access(accessor: Accessor) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment