Inability to create an extension for some nested types

Originator:steve_w101
Number:rdar://20337822 Date Originated:28/3/2015
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.2 (6C131e) / OS X Yosemite 10.10.2 (14C1510)
Classification:Other bug Reproducible:Always
 
Summary:
Please examine the sample project at https://github.com/NxSoftware/Namespacing. It attempts to explore the use of nested types to provide namespaces.

It has a class "SW" as it's top level namespace, followed by an extension containing a nested class "Networking".

There is then an extension on the nested "Networking" class that provides additional classes "HTTP" and "FTP".

Finally there are extensions for "HTTP" and "FTP" that attempt to add methods to those classes.

The idea being that code such as that present in ViewController.swift is possible. I.e...

let ftp = SteveWilford.Networking.FTP()

Steps to Reproduce:


Expected Results:
Successful compilation.

Actual Results:
The compilation fails stating that "'Networking' is not a member type of 'SteveWilford'" when attempting to build the FTP extension.

For some reason it has no problem with the HTTP extension which is structured in exactly the same way.

Notes:
Furthermore it appears to be impossible to create any extensions of SteveWilford.Networking in files other than SWNetworking.swift of SWHTTP.swift even in ViewController.swift where both SteveWilford.Networking.HTTP and .FTP are used successfully.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!