Thread overview
[Issue 5150] New: lazy allows you to declare void parameters
Nov 01, 2010
Jonathan M Davis
Nov 01, 2010
Stewart Gordon
Nov 01, 2010
Jonathan M Davis
November 01, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5150

           Summary: lazy allows you to declare void parameters
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: jmdavisProg@gmx.com


--- Comment #0 from Jonathan M Davis <jmdavisProg@gmx.com> 2010-11-01 09:24:46 PDT ---
This program compiles:

void func(lazy void a)
{
}

void main()
{
}


It shouldn't. If a were not lazy, you'd get the error

d.d(1): Error: cannot have parameter of type void


It shouldn't be any more legal to have a lazy void parameter than a void parameter. It makes it seem like lazy parameters aren't properly type checked.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 01, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5150


Stewart Gordon <smjg@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |smjg@iname.com
         Resolution|                            |INVALID


--- Comment #1 from Stewart Gordon <smjg@iname.com> 2010-11-01 09:53:30 PDT ---
The spec explicitly allows it.

http://www.digitalmars.com/d/1.0/function.html#parameters

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 01, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5150



--- Comment #2 from Jonathan M Davis <jmdavisProg@gmx.com> 2010-11-01 09:58:37 PDT ---
Okay. Why? What possible use does it have?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------