Bug 1761 – TypeInfo.toString for function types always indicates no-parameter function

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-01-01T17:06:00Z
Last change time
2017-01-16T23:24:11Z
Keywords
bootcamp
Assigned to
lucia.mcojocaru
Creator
mi_emayl_adrez
Depends on
1519

Comments

Comment #0 by mi_emayl_adrez — 2008-01-01T17:06:51Z
class C { void func() {} void func(int a) {} void func(int a, int b) {} } void main() { foreach (t; __traits(getVirtualFunctions, C, "func")) writefln(typeid(typeof(t))); } prints: void() void() void() it would be more useful if it did: void() void(int) void(int, int)
Comment #1 by smjg — 2008-09-09T15:58:08Z
It's not a problem with traits, it's a problem with the TypeInfo for functions/delegates.
Comment #2 by lucia.mcojocaru — 2016-11-13T10:21:22Z
Comment #3 by github-bugzilla — 2016-11-13T19:27:37Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/ff4adf65b16cefc4caa831e9a6983970d831396e fix issue 1761 https://github.com/dlang/druntime/commit/fc2acbd2043da296887ac540770806e07cab54dd Merge pull request #1692 from somzzz/issue_1761 fix issue 1761 - TypeInfo.toString for function types always indicates no-parameter function
Comment #4 by github-bugzilla — 2016-12-27T13:10:55Z
Comment #5 by github-bugzilla — 2017-01-07T03:01:50Z
Comment #6 by github-bugzilla — 2017-01-16T23:24:11Z