mixin template FAIL
Zach the Mystic
reachzachatgooglesmailservice at dot.com
Tue Feb 21 10:47:06 PST 2012
I decided to try using template mixin, but even the simplest program
fails. What's wrong with this code? Error list follows.
DMD64 D Compiler v2.057 OSX 10.6
import std.stdio;
mixin template helpMe()
{
writeln("Satisfying!");
}
void main()
{
mixin helpMe();
}
test.d(5): unexpected ( in declarator
test.d(5): basic type expected, not "Satisfying!"
test.d(5): found '"Satisfying!"' when expecting ')'
test.d(5): no identifier for declarator writeln(int)
test.d(5): semicolon expected following function declaration
test.d(5): Declaration expected, not ')'
test.d(10): ';' expected after mixin
test.d(10): found ')' instead of statement
More information about the Digitalmars-d-learn
mailing list