http://d.puremagic.com/issues/show_bug.cgi?id=6744



--- Comment #2 from Kenji Hara <k.hara...@gmail.com> 2011-09-30 07:25:02 PDT ---
This is not only the problem of AA, it is where template instantiation is
belongs to.

---- test.d
import traits;
void func()(){ X!() x; auto n = x.length; }
void main(){ func(); assert(0); }

---- traits.d
struct X(){ int length(){ return 0; } }
enum x = X!()();

---- command line
dmd test.d

---- output
OPTLINK (R) for Win32  Release 8.00.7
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
test2.obj(test2)
 Error 42: Symbol Undefined _D6traits6__T1XZ1X6lengthMFZi

semantic() runs against the type of X!() at both line 2 in test and line 2 of
traits, but its instantiation belongs to only traits, because the semantic runs
 first in traits.
But the module traits never generate .obj, then the symbol ob X!().length will
be lost.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to