Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-5520] Member type inconsistency / file restriction #48092

Closed
swift-ci opened this issue Jul 21, 2017 · 1 comment
Closed

[SR-5520] Member type inconsistency / file restriction #48092

swift-ci opened this issue Jul 21, 2017 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-5520
Radar None
Original Reporter Madcap (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

OSX 10.11.6
Xcode 8.2.1

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

md5: ddebdb42c5e39e91f3f2a43604eeeda2

duplicates:

  • SR-631 Extensions in different files do not recognize each other

Issue Description:

Extending a class/struct (B) which was declared within an extension of a class/struct (A) OUTSIDE of the original swift file results in "B is not a member of A".

Example:

FileA.swift:

<span color="#dc3e9f">struct</span> Foo {}  
<span color="#dc3e9f">extension</span> Foo {  
    <span color="#dc3e9f">struct</span> Bar {}  
}

<span color="#dc3e9f">extension</span> Foo.Bar {  
    <span color="#14892c">This works</span>  
}

FileB.swift:

<span color="#d04437">!![]( 'Bar' is not a member type of 'Foo' )!</span>  
<span color="#dc3e9f">extension</span> Foo.Bar {  
    <span color="#14892c">This doesn't</span>  
}
@belkadan
Copy link
Contributor

A longstanding bug that's been nontrivial to fix. :-(

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants