Bug 3404 – JSON output should retain original alias names
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-10-15T02:54:00Z
Last change time
2013-01-19T23:09:21Z
Keywords
json
Assigned to
nobody
Creator
ary
Comments
Comment #0 by ary — 2009-10-15T02:54:38Z
For this input:
---
module main;
alias int myInt;
myInt x;
---
The JSON output is:
---
{
"name" : "main",
"kind" : "module",
"file" : "main.d",
"members" : [
{
"name" : "myInt",
"kind" : "alias",
"type" : "int",
"line" : 5}
,{
"name" : "x",
"kind" : "variable",
"type" : "int",
"line" : 7}
]
}
---
But the last one should be:
---
{
"name" : "x",
"kind" : "variable",
"type" : "myInt",
"line" : 7}
---
That is, aliases should not be forgotten. This is especially important for binding libraries where aliases are heavily used.