Declare reference to variable ?

Temtaime temtaime at gmail.com
Mon Jul 29 14:25:19 PDT 2013


No, i cannot.

struct S {
	uint longnamed;
}

void main() {
	S somestruct;

	alias v = somestruct.longnamed;
	writeln(v);
}

Error: need 'this' for 'longnamed' of type 'uint'

Is it a bug ?


More information about the Digitalmars-d-learn mailing list