Skip to content

[SR-5304] Same name for class and namespace #47879

@swift-ci

Description

@swift-ci
Previous ID SR-5304
Radar None
Original Reporter marian.cerny (JIRA User)
Type Bug
Status Reopened
Resolution
Environment

Xcode 8.3.3
Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)

Additional Detail from JIRA
Votes 7
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 2b862ecbd903be9a1fa2942328b1de8e

Issue Description:

I have type Magazine declared in two frameworks.
So I get 'Magazine' is ambiguous for type lookup in this context error.
When I add the correct prefix Book.Magazine, I get 'Magazine' is not a member type of 'Book', because there is a type Book as well.

It's not possible to specify the correct namespace, because the compiler is looking for nested class with the same name instead.

Similar issue: https://forums.developer.apple.com/thread/47421

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilerThe Swift compiler itselfdisambiguationBug: disambiguationmultiple modulesFlag: An issue whose reproduction requires multiple modulestypesFeature: types

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions