March 28, 2003 'new foo' is not an l-value | ||||
---|---|---|---|---|
| ||||
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; } |
May 16, 2003 Re: 'new foo' is not an l-value | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jon Allen | "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; |
Copyright © 1999-2021 by the D Language Foundation