Bug 3309 – `Traits` : function parameters name

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-09-10T06:58:00Z
Last change time
2015-06-09T05:13:47Z
Assigned to
nobody
Creator
julien

Attachments

IDFilenameSummaryContent-TypeSize
448traits.c.patchtraits.c patchtext/plain914
449parametersNameTest.dTest casetext/plain1050
450id.h.patchid.h patchtext/plain303
451id.c.patchid.c patchtext/plain516
717parametersName.dmd.idgen.c.patchdmd/idgen.ctext/plain236
718parametersName.dmd.traits.c.patchdmd/traits.ctext/plain1031
719parametersName.phobos.traits.d.patchphobos/traits.dtext/plain852

Comments

Comment #0 by julien — 2009-09-10T06:58:50Z
Created attachment 448 traits.c patch Hello, I'm trying to add a small __traits keyword to traits.c to get a function parameter names, as : void foo(in string name) would return [ "name" ]; void bar(in string firstname, in string lastname) would return [ "firstname", "lastname" ]; Thanks to Andrei & Walter for the first tips. Please review the patch, Thank you, Julian.
Comment #1 by julien — 2009-09-10T06:59:30Z
Created attachment 449 Test case
Comment #2 by julien — 2009-09-10T06:59:58Z
Created attachment 450 id.h patch
Comment #3 by julien — 2009-09-10T07:00:29Z
Created attachment 451 id.c patch
Comment #4 by julien — 2010-08-15T11:10:52Z
Created attachment 717 dmd/idgen.c
Comment #5 by julien — 2010-08-15T11:11:40Z
Created attachment 718 dmd/traits.c
Comment #6 by julien — 2010-08-15T11:11:59Z
Created attachment 719 phobos/traits.d
Comment #7 by github-bugzilla — 2012-07-08T13:38:34Z
Comment #8 by k.hara.pg — 2012-08-15T09:24:18Z
Comment #9 by github-bugzilla — 2012-09-02T06:18:32Z
Commits pushed to master at https://github.com/D-Programming-Language/d-programming-language.org https://github.com/D-Programming-Language/d-programming-language.org/commit/57236fafa07e2591571775b5e05fc515a187ffd6 Revert "Fix issue 3309" This reverts commit ab2c26fb3c7ea88183dffe20187c3a87c9c959eb. This is incorrect documentation. https://github.com/D-Programming-Language/d-programming-language.org/commit/ec7932dc1dd701f35fe6a834e674228eee829092 Merge pull request #150 from 9rnsr/fix_traits Revert "Fix issue 3309"