questions on PhanTango 'merger' (was Merging Tangobos into Tango)- long-term vision
Bill Baxter
dnewsgroup at billbaxter.com
Thu Oct 11 23:06:40 PDT 2007
Chad J wrote:
> BCS wrote:
>>
>> I think you can uses aliases in other files.
>>
>>
>
> I just tested it, and apparently I'm wrong.
>
> In fact, I'm glad I'm wrong.
>
> I think I know what the snag was now. Something to the opposite effect.
> Aliases can't be hidden at a module level, even by private.
>
> // imp.d
> private alias int Foo;
>
> // main.d
> import imp;
>
> void main()
> {
> Foo bar = 3;
> }
>
> // Compiles and runs.
>
> Interestingly, aliases can be hidden by placing them in other
> constructs. Just change imp.d to the following:
> //imp.d
> private struct Baz
> {
> alias int Foo;
> Foo member;
> }
>
> Then the desired compile failure happens. Even so, it can be
> circumvented by writing Baz.Foo in main(). Given this cursory
> inspection, it seems that there is no way to completely hide aliases.
> I'm not sure how I feel about that.
I'm very sure how I feel about that. It's a bug.
Anyone know if it's been filed?
--bb
More information about the Digitalmars-d
mailing list