> On Apr 19, 2016, at 4:09 AM, Marco Feltmann via swift-users 
> <swift-users@swift.org> wrote:
> 
> "But wait a sec, how can NSFount(name: "", size: 0) result in an NSNumber?" 
> you may ask.
> I don't now.
> The behaviour of NSFonts +fonttWithName:size: for empty/not found font name 
> is not defined in the documentation, so ANY result is correct.

That’s not true. The result has to be an NSFont? as declared in the class 
interface — it can’t be an NSNumber. This has nothing to do with whether the 
font is not found at runtime; we’re talking about compile-time type inference.

—Jens
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to