[Issue 8256] mixin() doesn't work in a template declaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 17 00:20:38 PDT 2012


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


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2012-06-17 00:22:55 PDT ---
This is not allowed in current spec.

http://dlang.org/expression.html#MixinExpression

MixinExpression is an expression, not a type.

template Foo(T = mixin(getTypeName())) { }
                 ^
                 There should be a type.

And the text contents of the string must be compilable as a valid
AssignExpression.

-- 
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