www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10548] New: [REG 2.064a] argument has no identifier

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

           Summary: [REG 2.064a] argument has no identifier
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: yazan.dabain gmail.com



import std.stdio, std.traits;

int foo(int num, string name);

void main() {
  void bar(int num){}
  static if (is(FunctionTypeOf!bar PT == __parameters)) {
    pragma(msg, __traits(identifier, PT[0..1]));
  }
}


Compiling this code using dmd 2.063, you get "num" printed out.
In dmd 2.064a, the compiler prints:

------
main.d(8): Error: argument int has no identifier
false
------

This regression is caused by commit: 877e7bf
pull request: https://github.com/D-Programming-Language/dmd/pull/1102
fixing: http://d.puremagic.com/issues/show_bug.cgi?id=3646

This is blocking: https://github.com/D-Programming-Language/phobos/pull/1378

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


Kenji Hara <k.hara.pg gmail.com> changed:

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




parameter identifiers never appear in the result of FunctionTypeOf template.

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


Kenji Hara <k.hara.pg gmail.com> changed:

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



Sorry, the above comment was my mistake. Finally I've concluded that the
current git head behavior is *unnecessarily* restrictive. I reconsidered about
it and convinced that fixing this *regression* won't introduce any dangerous
semantics.

I reopen this issue.

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


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid



https://github.com/D-Programming-Language/dmd/pull/2311

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




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/7f932696732c9f8237b039b72342e3080ddd8c11
Issue 10548 - argument has no identifier

Don't strip default args and parameter names on alias declarations.
Instead do it against template type arguments.

https://github.com/D-Programming-Language/dmd/commit/0f36bb59d3f4be01b19510d7c625ed458f00b831


[REG2.064a] Issue 10548 - argument has no identifier

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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