[swift-evolution] [Discussion] A Problem With SE-0025?

Adrian Zubarev adrian.zubarev at devandartist.com
Wed Jun 15 14:43:42 CDT 2016


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.zubarev at 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*.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160615/cca134aa/attachment.html>


More information about the swift-evolution mailing list