Qualifying Swift types by their module name doesn't work

Originator:jgallagher
Number:rdar://17127940 Date Originated:6/3/2014
Status:Open Resolved:
Product:Xcode Product Version:6.0
Classification:Serious Bug Reproducible:Always
 
See attached project. It has two Swift frameworks (Framework1 and Framework2, each of which has a class named MyClass. In the application target, this code:

import Framework1
import Framework2

func foo() {
    let m1 = Framework1.MyClass()
    let m2 = Framework2.MyClass()
}

fails to build with errors:

/Users/john/Documents/swift/NamespaceError/NamespaceError/File.swift:14:14: error: module 'Framework1' has no member named 'MyClass'
    let m1 = Framework1.MyClass()
             ^          ~~~~~~~
/Users/john/Documents/swift/NamespaceError/NamespaceError/File.swift:15:14: error: module 'Framework2' has no member named 'MyClass'
    let m2 = Framework2.MyClass()
             ^          ~~~~~~~

Steps to Reproduce:
Open attached project and try to build it.

Expected Results:
The project should build, and m1/m2 should have their appropriate types.

Actual Results:


Version:
Version 6.0 (6A215l)

Notes:


Configuration:


Attachments:
'NamespaceError.zip' was successfully uploaded.

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!