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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 5 17:00:19 PDT 2009


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

           Summary: Precedence of 'new' vs '.'
           Product: D
           Version: 1.042
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: benoit at tionex.de


In Java one can write:

new MyClass().run();

in D this does not compile, parenthesis are needed.

(new MyClass()).run();

I think this should behave like Java.
See also
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=89433


-- 



More information about the Digitalmars-d-bugs mailing list