www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - strange alias behavior

reply "Vlad Levenfeld" <vlevenfeld gmail.com> writes:
I'm expecting in this code http://dpaste.dzfl.pl/ee0d3cd31734
either line 8 should not compile, or lines 12 and 14 should have 
a totally different output. What's going on?
Feb 05 2015
parent Jonathan M Davis via Digitalmars-d-learn writes:
On Thursday, February 05, 2015 23:08:13 Vlad Levenfeld via Digitalmars-d-learn
wrote:
 I'm expecting in this code http://dpaste.dzfl.pl/ee0d3cd31734
 either line 8 should not compile, or lines 12 and 14 should have
 a totally different output. What's going on?
It looks like alias b = that.obj; is actually aliasing this.obj instead of that.obj for some reason, which is definitely a compiler bug. Please report it: https://issues.dlang.org - Jonathan M Davis
Feb 05 2015