Index: polemy/eval.d ================================================================== --- polemy/eval.d +++ polemy/eval.d @@ -221,11 +221,14 @@ foreach(i,p; f.params()) if( p.layers.empty ) newCtx.set(p.name, isMacroLayer(lay)?MacroLayer:lay, eval(args[i], lay, ctx)); else foreach(argLay; p.layers) - newCtx.set(p.name, argLay, eval(args[i], argLay, ctx)); + if( lay!=MacroLayer && isMacroLayer(argLay) ) // explicit @macro invokes (rawmacro) + newCtx.set(p.name, argLay, eval(args[i], RawMacroLayer, ctx)); + else + newCtx.set(p.name, argLay, eval(args[i], argLay, ctx)); scope _ = new PushCallStack(pos, callstackmsg); return f.invoke(isMacroLayer(lay)?MacroLayer:lay, newCtx, pos); } throw genex!RuntimeException(pos, text("tried to call non-function: ",_f)); }