[Issue 6056] Type lookup problem in string mixins

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 25 11:43:02 PDT 2011


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


kennytm at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kennytm at gmail.com
           Platform|Other                       |x86
         OS/Version|Mac OS X                    |All


--- Comment #1 from kennytm at gmail.com 2011-05-25 11:38:45 PDT ---
Reduced test case:

--------------------------------------
template Bug6056() {
    mixin("alias const typeof('c') A; alias const typeof(0) B;");
    static assert(is(B == int));
}

alias Bug6056!() Bug6056_dummy;
--------------------------------------
x.d(4): Error: static assert  (is(char == int)) is false
x.d(7):        instantiated from here: Bug6056!()
--------------------------------------

Alternative test case:

--------------------------------------
template Bug6056b() {
    mixin("alias const(typeof('c')*) A; alias const(typeof(0)*) B;");
    static assert(is(B == const(int*)));
}

alias Bug6056b!() Bug6056b_dummy;
--------------------------------------

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


More information about the Digitalmars-d-bugs mailing list