Shouldn’t a file act like an individual scope? If so why would A be visible in 
C? Is it because files act not a lexical scopes?



-- 
Adrian Zubarev
Sent with Airmail

Am 15. Juni 2016 um 21:34:23, Adrian Zubarev (adrian.zuba...@devandartist.com) 
schrieb:

Your example #2 is just incorrect.  `A` is visible inside the scope of `C`.

Now that we have introduced a scope-dependent access modifier it is an 
incorrect mental model to consider members with no access modifier as having 
the exact same access modifier as the containing scope.  This is no longer 
correct.  They have the same *visibility*, not the same *access modifier*.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to