Bug 3466 – Wrong JSON output for templated classes, structs, and interfaces

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-11-02T01:21:00Z
Last change time
2013-01-20T02:25:39Z
Keywords
json
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2009-11-02T01:21:50Z
test.d: module test; struct Foo(T) { T t; } class Bar(T) { T t; } Compiling this with "dmd -c -X test.d" results in the file test.json containing the following. Note that the "kind" field for Foo(T) and Bar(T) contains "struct" and "class" respectively, as opposed to "template". The same problem does not occur with templated functions. { "name" : "test", "kind" : "module", "file" : "test.d", "members" : [ { "name" : "Foo(T)", "kind" : "struct", "line" : 2, "members" : [ { "name" : "Foo", "kind" : "struct", "line" : 2, "members" : [ { "name" : "t", "kind" : "variable", "type" : "T", "line" : 2} ] } ] } ,{ "name" : "Bar(T)", "kind" : "class", "line" : 3, "members" : [ { "name" : "Bar", "kind" : "class", "line" : 3, "members" : [ { "name" : "t", "kind" : "variable", "type" : "T", "line" : 3} ] } ] } ] }
Comment #1 by simen.kjaras — 2010-07-03T06:29:45Z
This also applies to interfaces.
Comment #2 by ricochet1k — 2012-03-14T13:01:39Z
Comment #3 by bugzilla — 2013-01-19T23:20:52Z