This file should demonstrate the listed issues (and a few more):
---------------------------------------------------------
module test.json; // adds package list
// a pretty verbose reference to the module itself is added quite often throughout the module
// object always listed as import (good? bad?)
import std.ascii; // name is "std", but module is "test.json"!?
import stdstring = std.string; // name is "stdstring", std.string not shown
import std.algorithm : min, max; // name is "__anonymous", min/max not specified
static import std.array; // kind "static import"
class TestClass
{
void func1(int a) // shows identical "type" and "originalType"
{ // with a type dictionary, parameters names should be removed
}
int func(string s1, string s2) // shows both "type" and "originalType", with different argument types
{ // "string" in originalType contains "idents" : [],
return 0; // and identical "identifier" and "rawIdentifier"
}
}
mixin template Mix(T)
{
T mixmember;
}
class DerivedClass : TestClass
{
mixin Mix!int; // listed as "mixin", but mixmember not added
override void func1(int a) // "overrides" contains full type ad originalType of TestClass.func1
{
int b = min(a, 0); // adds "template instance" "min!(int, int, )"
}
}
static assert("test" != "Test"); // adds "static assert" entry without any sensible info
void main()
{
}
-----------------------------
-- reported by Rainer Schuetze
Comment #6 by dlang-bugzilla — 2014-01-29T04:19:55Z
CCing Rainer as he's the original reporter
Comment #7 by r.sagitario — 2014-02-24T23:25:04Z
I verified the results for the listed tet case: It seems all issues are addesssed but one: listing the resulting members of the expanded "mixin Mix!int;". I'm not sure if this is supposed to work. It very much depends on the use case (e.g. dtoh might need it).
Still I'm not really happy with how it turned out, because for one of my use cases (showing human readable parameter tool tips), it has become more tedious (not so easy to interleave argument identifiers), and it becomes ugly and unreadable if complex aliased types have been used (the alias is lost).
Comment #8 by robert.schadek — 2024-12-13T18:04:00Z