I have a few cases like that in production code with an unthread safe private function shadows a more public function that applies thread safety for external callers, etc.
-Shawn On Tue, Mar 21, 2017 at 9:37 AM Tino Heth via swift-evolution < [email protected]> wrote: > > > Fact is, you can replace every occurrence of "private" with > "fileprivate", and your source would compile as before, whereas fileprivate > saves us from a "friend"-keyword. > > This is certainly a source-breaking change. Consider: > > struct Foo { > > fileprivate func foo()->String {return "foo" } > > private func foo()->Int {return 2} > > } > > print("\(Foo().foo())") > > Replacing “private” with “fileprivate” here will introduce a compile error. > > True indeed… but can we agree that this is just an hypothetic example, and > no issue that is likely to happen in productive code? > Or is this actually taken from one of the projects you measured? > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution >
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
