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


--- Comment #0 from yazan.dabain gmail.com 2013-07-05 03:58:06 PDT ---
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


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-07-06 07:47:22 PDT ---
This is expected change. After pull #1102 change, default arguments and
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                     |


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2013-07-07 05:55:45 PDT ---
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


--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2013-07-07 06:20:52 PDT ---
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



--- Comment #4 from github-bugzilla puremagic.com 2013-07-07 13:47:51 PDT ---
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
Merge pull request #2311 from 9rnsr/improveDefArgs

[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