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-4521] Framework extensions are accessible inside file without import #47098

Closed
farzadshbfn opened this issue Apr 7, 2017 · 1 comment
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself duplicate Resolution: Duplicates another issue extension Feature → declarations: `extension` declarations multiple modules Flag: An issue whose reproduction requires multiple modules name lookup Area → compiler → type checker: Name lookup swift 5.8 unexpected behavior Bug: Unexpected behavior or incorrect output

Comments

@farzadshbfn
Copy link

farzadshbfn commented Apr 7, 2017

Previous ID SR-4521
Radar None
Original Reporter @farzadshbfn
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: fdb3a1a23bde7df2348f57ee3c7a5bf1

duplicates:

Issue Description:

This error happened in Xcode(iOS) (not sure if it's because of Xcode or swift)

I have two frameworks (installed via Cocoapods). They both have the type Layout.
In framework 1 Layout is a public class.
In framework 2 Layout is a public protocol. Layoutter is a public protocol too, which has a var layout: Layout { get } inside it.

There's also an extension in framework 1 which extends UIView with var layout: Layout which is added to the class using objc_setAssociatedObject.

I'm trying to implement a UIView subclass implementing Layoutter, and get a variable named layout: Layout from framework 2, but compiler keeps saying that: "Overriding non-open var outside of its defining module".

note: framework 1 is not imported into the file.

@belkadan
Copy link
Contributor

belkadan commented Apr 7, 2017

A longstanding issue, unfortunately.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added duplicate Resolution: Duplicates another issue extension Feature → declarations: `extension` declarations unexpected behavior Bug: Unexpected behavior or incorrect output multiple modules Flag: An issue whose reproduction requires multiple modules swift 5.8 name lookup Area → compiler → type checker: Name lookup labels May 11, 2023
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 duplicate Resolution: Duplicates another issue extension Feature → declarations: `extension` declarations multiple modules Flag: An issue whose reproduction requires multiple modules name lookup Area → compiler → type checker: Name lookup swift 5.8 unexpected behavior Bug: Unexpected behavior or incorrect output
Projects
None yet
Development

No branches or pull requests

3 participants