www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10795] New: Bad return type of ParameterIdentifierTuple if there is no arguments

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

           Summary: Bad return type of ParameterIdentifierTuple if there
                    is no arguments
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: temtaime gmail.com


--- Comment #0 from Temtaime <temtaime gmail.com> 2013-08-11 11:08:27 PDT ---
import std.stdio;
import std.traits;

void foo() {
}

void main() {
    enum arr = [ ParameterIdentifierTuple!foo ];
    writeln(typeof(arr).stringof);
}

Prints:
void[]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 11 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10795


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com


--- Comment #1 from yebblies <yebblies gmail.com> 2013-08-29 22:37:38 EST ---
What would you expect it to be?

It expands to:

import std.stdio;
import std.traits;

void foo() {
}

void main() {
    enum arr = [ ];
    writeln(typeof(arr).stringof);
}

And arr is correctly inferred to have a type of void[] (the type of the literal
[]).  There are no expressions the the result of ParameterIdentifierTuple to
infer any other type from.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 29 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10795


Temtaime <temtaime gmail.com> changed:

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


--- Comment #2 from Temtaime <temtaime gmail.com> 2013-08-30 12:33:56 PDT ---
Sorry, seems to be my mistake.

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