www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2374] New: (exp).Fn() fail assuming that exp is a type

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2374

           Summary: (exp).Fn() fail assuming that exp is a type
           Product: D
           Version: 1.035
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: shro8822 vandals.uidaho.edu


struct S
{
  void Fn();
}

void main()
{
  S s;
  (s).Fn();
}


-- 
Sep 25 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2374


shro8822 vandals.uidaho.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shro8822 vandals.uidaho.edu




------- Comment #1 from shro8822 vandals.uidaho.edu  2008-09-25 17:27 -------

Errors:

Line 9: Error: s is used as a type
Line 9: Error: no property 'Fn' for type 'void'
Line 9: Error: function expected before (), not 1 of type int


-- 
Sep 25 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2374


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Comment #2 from bugzilla digitalmars.com  2008-10-04 03:56 -------
In order to reduce ambiguities, expressions of the form (identifier) are not
recognized as expressions. There is no purpose to such expressions, as they are
equivalent to just plain identifier.


-- 
Oct 04 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2374


shro8822 vandals.uidaho.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
           Priority|P2                          |P3
         Resolution|WONTFIX                     |




------- Comment #3 from shro8822 vandals.uidaho.edu  2008-10-04 14:58 -------
the "(id)" form is useful in some code generation cases where the id is a
trivial case of something that some times needs the () but where it's non
trivial to known if it is.

reopen at low priority.


-- 
Oct 04 2008