www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3509] New: Cannot forward reference a template mixin's members in a compile-time context

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3509

           Summary: Cannot forward reference a template mixin's members in
                    a compile-time context
           Product: D
           Version: 1.051
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: matti.niemenmaa+dbugzilla iki.fi
            Blocks: 340


--- Comment #0 from Matti Niemenmaa <matti.niemenmaa+dbugzilla iki.fi>
2009-11-14 12:29:13 PST ---
template T(bool b) { static assert (b); }

template Mix() { void f() {} }

class C {
    alias T!(is(typeof(M.f))) U;
    mixin Mix!() M;
}

foo.d(1): Error: static assert  (b) is false


Moving the alias below the mixin makes the code compile.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 14 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3509



--- Comment #1 from github-bugzilla puremagic.com 2012-03-12 19:28:22 PDT ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3a45e50f400ad1ec8bb179c95ee39594028a534f
fix Issue 3509 - Cannot forward reference a template mixin's members in a
compile-time context

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3509



--- Comment #2 from github-bugzilla puremagic.com 2012-03-12 19:28:40 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ebc3fa912b24182aa3204d0b9c49a59bd3d9d85f
fix Issue 3509 - Cannot forward reference a template mixin's members in a
compile-time context

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3509


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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