Public Private members?
rikki cattermole
rikki at cattermole.co.nz
Mon Apr 15 17:59:16 UTC 2019
On 16/04/2019 5:56 AM, bauss wrote:
> On Monday, 15 April 2019 at 17:38:15 UTC, Flying-Toast wrote:
>> I am not sure if this is a bug or if there is some explanation for
>> this behavior, but either way it is confusing and I think it should
>> cause an Error.
>>
>> ---
>> class A {
>> private {
>> public int a;//No Error???
>> }
>>
>> private public string s;//Error, expected
>> }
>> ---
>>
>> https://run.dlang.io/is/odJDnA
>
> I would argue that it's indeed a bug.
I would argue that it is not a bug.
If it is a bug, then this snippet is also a bug:
struct Foo {
private:
int a;
public:
int b;
}
More information about the Digitalmars-d
mailing list