Bug 3509 – Cannot forward reference a template mixin's members in a compile-time context

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2009-11-14T12:29:00Z
Last change time
2014-04-18T09:12:05Z
Keywords
rejects-valid
Assigned to
nobody
Creator
matti.niemenmaa+dbugzilla
Blocks
340

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2009-11-14T12:29:13Z
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.
Comment #1 by github-bugzilla — 2012-03-12T19:28:22Z
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
Comment #2 by github-bugzilla — 2012-03-12T19:28:40Z
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