[Issue 1732] Mixin can not be instantiated
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 16 06:59:59 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1732
matti.niemenmaa+dbugzilla at iki.fi changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Comment #1 from matti.niemenmaa+dbugzilla at iki.fi 2007-12-16 08:59 -------
Templates can only contain declarations, not statements. The template alone is
invalid.
As http://www.digitalmars.com/d/1.0/template.html says:
"The body of the TemplateDeclaration must be syntactically correct even if
never instantiated. Semantic analysis is not done until instantiated. A
template forms its own scope, and the template body can contain classes,
structs, types, enums, variables, functions, and other templates."
Your template is syntactically invalid, as it doesn't contain a DeclDef but an
AssignExpression.
--
More information about the Digitalmars-d-bugs
mailing list