foreach (y; aliasSeqOf!["a", "b", "c"])
{
static if (y == "a") { }
else
 pragma(msg, y);
}

works but

foreach (y; aliasSeqOf!["a", "b", "c"])
{
static if (y == "a") continue
pragma(msg, y);
}

fails.

Seems like continue needs to be static aware.

This leads to subtle bugs where one thinks the continue statement(like in in a runtime foreach loop, should jump to to the next iteration, but it doesn't.

The runtime versions of the code work identically, and so should the static versions.

Reply via email to