D - 'new foo' is not an l-value
- "Jon Allen" <jallen minotstateu.edu> Mar 27 2003
- "Walter" <walter digitalmars.com> May 16 2003
I think I found a compiler bug. The commented line doesn't work, but the
following two do. This doesn't seem right. Am I missing something here?
class foo
{}
void main()
{
foo* bar;
foo blah;
//bar=&(new foo);
blah=new foo;
bar=&blah;
}
Mar 27 2003
"Jon Allen" <jallen minotstateu.edu> wrote in message news:b60ke6$31gj$1 digitaldaemon.com...I think I found a compiler bug. The commented line doesn't work, but the following two do. This doesn't seem right. Am I missing something here? class foo {} void main() { foo* bar; foo blah; //bar=&(new foo); blah=new foo; bar=&blah; }
Think of it as analogous to: bar = &(x + y); as opposed to: blah = (x + y); bar = &blah;
May 16 2003








"Walter" <walter digitalmars.com>