Ok, spoke too soon again, my string requires compound splitting: foreach(ss; split(s, ",")) { split(ss, "|"); // ss can't be read at compile time although I can use ss directly string a = ss; // works fine. }