Sorry about the htmlOn Fri, 16 Jul 2010 11:46:48 +0200, Rory McGuire <[email protected]> wrote:
import std.stdio;
struct State {
string s; string getString() { return s; }
static State opCall(string s) {
State ret;
ret.s = s;
return ret;
}
}
void main() {
auto s = State("adf");
pragma(msg, s.getString());
}
dmd Output: (line 14 is the pragma statement)
struct.d(14): Error: variable s cannot be read at compile time
struct.d(14): Error: cannot evaluate s.getString() at compile time
s.getString()
