The following code was copied from D document:
http://www.digitalmars.com/d/statement.html#WithStatement
with a little modification. The 7th line have caused a compile error "Foo is not a lvalue".
void main() {
struct Foo {
typedef int Y;
}
with (Foo) { //Error: Foo is not a lvalue
Y y;
}
}
Comment #1 by onlystupidspamhere — 2007-06-26T14:13:49Z