How can you read and understand the source of *naryFun in functional.d?

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Jan 29 11:28:30 PST 2011


Andrei, I think there's a lurking bug in unaryFunImpl, on line 53:
            enum testAsExpression = "{ ElementType "~parmName
                ~"; return ("~fun~");}()";
            enum testAsStmts = "{"~ElementType.stringof
                ~" "~parmName~"; "~fun~"}()";

Notice the second enum, I think it's missing a ";" after "~fun~".
It might need changing the last chars from "}()"; to ";}()";

That enum is never used in code which explains why the typo hasn't
been caught yet.


More information about the Digitalmars-d-learn mailing list