Created
February 16, 2019 13:46
-
-
Save amichnia/56287b0d6ae31f2fb6887225e18d50f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Somewhere in the wild west | |
import MyFramework | |
... | |
// This should work | |
let publicClass = MyPublicClass() | |
publicClass.doSomethingWithPrivateClass() | |
... | |
// This should not be possible, nor even compile, | |
// as it should not be able to see MyPrivateClass !!! | |
let privateClass = MyPrivateClass() | |
privateClass.doSomethingInternal(withSecretAttribute: 13) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment