[Issue 2945] Precedence of 'new' vs '.'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 6 02:50:49 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2945


matti.niemenmaa+dbugzilla at iki.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|PC                          |All




------- Comment #1 from matti.niemenmaa+dbugzilla at iki.fi  2009-05-06 04:50 -------
There might be a problem here in that in D you can write it without the
brackets:

new MyClass.Foo;

Is the above trying to create a new Myclass.Foo or is it trying to create a new
MyClass and then access its Foo member? It depends on the type of Foo, and such
a dependency is, I think, what Walter has been trying to avoid.

Nevertheless, I often forget the brackets myself and wouldn't mind this change,
I just think the above means that it's not going to happen.


-- 



More information about the Digitalmars-d-bugs mailing list