[SR-4521] Framework extensions are accessible inside file without import
#47098
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
Additional Detail from JIRA
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 avar layout: Layout { get }
inside it.There's also an extension in framework 1 which extends
UIView
withvar layout: Layout
which is added to the class usingobjc_setAssociatedObject
.I'm trying to implement a
UIView
subclass implementingLayoutter
, and get a variable namedlayout: 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.
The text was updated successfully, but these errors were encountered: