Try changing Foo.print()to the following:
@objc func print() -> AnyObject? {
NSLog("print")
return nil
}
I believe the code works on the Playground as well.
performSelectorReturn type not Void.
- make a selection:
func performSelector(_ aSelector: Selector) -> Unmanaged<AnyObject>!
So, Playground is trying to get the value of the result to display. Which is not really coming back.
Ooper source
share