www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1699] New: unexpected identifer in declaration

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

           Summary: unexpected identifer in declaration
           Product: D
           Version: 2.008
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: ddparnell bigpond.com


The following line does not compile 

  const(const(int*) f()){}

It fails with the messages ...

  : unexpected identifer 'f' in declarator
  : no identifier for declarator const(int*)()


-- 
Nov 29 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1699


bugzilla digitalmars.com changed:

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





The correct way to declare f would be:

const const(int*) f(){}

or:

const(int*) f() const {}


-- 
Mar 07 2008