On Feb 25, 2016, at 15:03 , Jens Alfke <j...@mooseyard.com> wrote:
> 
> It also happens with NSDirectoryEnumerator, an NSEnumerator subclass declared 
> in <Foundation/NSFileManager.h>. NSEnumerator is parameterized, and so is 
> NSDirectoryEnumerator, and NSFileManager’s method enumeratorAtURL: returns an 
> NSDirectoryEnumerator<NSURL>.


In fact, the Swift NSDirectoryEnumerator just isn’t generic at all

In the Obj-C headers, NSEnumerator and NSDirectoryEnumerator are both annotated 
with “<AnyObject>”. enumeratorAtURL’s return value is annotated as 
“NSDirectoryEnumerator <NSURL*>”.

However, if you command-click on enumeratorAtURL in Swift code, you’ll see that 
the generated header doesn’t have NSURL in the return type. I’m not sure what’s 
supposed to happen in this situation. Are there any Swift generics produced 
from Obj-C annotations *other than* collection classes? I’ve got a feeling that 
the answer is no.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to