diff --git a/dyaml/node.d b/dyaml/node.d index 6d59e6d..0e3e92d 100644 --- a/dyaml/node.d +++ b/dyaml/node.d @@ -642,8 +642,8 @@ struct Node auto idx = findPair(index); if(idx >= 0){return get!(Pair[])[idx].value;} - throw new Error("Mapping index not found" ~ - isSomeString!T ? ": " ~ to!string(index) : "", startMark_); + string msg = "Mapping index not found" ~ (isSomeString!T ? ": " ~ to!string(index) : ""); + throw new Error(msg, startMark_); } throw new Error("Trying to index node that does not support indexing", startMark_); } diff --git a/examples/yaml_stats/Makefile b/examples/yaml_stats/Makefile index bf54376..9d7fd96 100644 --- a/examples/yaml_stats/Makefile +++ b/examples/yaml_stats/Makefile @@ -2,4 +2,4 @@ main: dmd -w -I../../ -L-L../../ -L-ldyaml yaml_stats.d clean: - rm yaml_stats myaml_stats.o + rm yaml_stats yaml_stats.o