Private alias escaping -- is this a bug?

2015-04-25 Thread rcorre via Digitalmars-d-learn
I ran into this infuriatingly confusing situation just now: static assert(is(typeof(Parent.init.new Child) == Parent.Child)); // fine alias P = Parent; alias T = Parent.Child; static assert(is(typeof(P.init.new T) == T)); // nope! Wat??? After much confusion, I finally discovered this in my

Re: Private alias escaping -- is this a bug?

2015-04-25 Thread Vlad Levenfeld via Digitalmars-d-learn
On Saturday, 25 April 2015 at 23:51:05 UTC, rcorre wrote: I ran into this infuriatingly confusing situation just now: static assert(is(typeof(Parent.init.new Child) == Parent.Child)); // fine alias P = Parent; alias T = Parent.Child; static assert(is(typeof(P.init.new T) == T)); // nope! Wa