> On Mar 21, 2017, at 15:26, Xiaodi Wu via swift-evolution > <swift-evolution@swift.org> wrote: > > The kicker is, _it also doesn't work_. Try, for instance: > > ``` > struct Foo { > private var bar: Int { return 42 } > } > > extension Foo { > private var bar: Int { return 43 } > } > ``` > > The code above should compile and does not. If I understood correctly the > explanation from a core team member on this list, it's unclear if it can be > made to work without changing how mangling works, which I believe impacts ABI > and is not trivial at all. Thus, (a) even proponents of new `private` > disagree on one of two key goals stated for new `private`; (b) that goal was > never accomplished, and making it work is not trivial; (c) no one even > complained about it, suggesting that it was a low-yield goal in the first > place.
Without commenting on anything else, it is considered a bug that this does not work under SE-0025, and it has been complained about <https://bugs.swift.org/browse/SR-2634> (though not vigorously, since the workaround is trivial), and fixing it would not be an ABI-breaking change (because private functions are not part of a module's ABI). Jordan
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution