Bison Dlang - alias this with private member causes errors

Isaac Bunsen <[email protected]> Tue, 7 Nov 2023 19:34:47 -0800
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <CAMse2m3UgR6A4iqjFnXYtQOpYmuzLz==cB+ZKNoqHxFTxSCu2A@mail.gmail.com>
line 274 of `\data\skeletons\d.m4`  `    private int yycode_;` needs to be
replaced with `    int yycode_;` The problem is while aliases to private
things are supported in D, the `alias *X* this` construct does not. Not
even in the same file (which is not not normal for things declared private
in D and may be a bug). Regardless, what happens is it won't build on dmd
(the D reference compiler), nor ldc2 (the popular llvm D implementation)
because it uses the struct in a call to format later in the generated code
which then expands to access the member.