Bug 9464 – Redo .json output

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-06T12:51:32Z
Last change time
2024-12-13T18:04:00Z
Assigned to
No Owner
Creator
Walter Bright
Moved to GitHub: dmd#18518 →

Comments

Comment #0 by bugzilla — 2013-02-06T12:51:32Z
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 #1 by bugzilla — 2013-02-06T12:52:11Z
Comment #2 by github-bugzilla — 2013-02-07T12:41:13Z
Comment #3 by yebblies — 2013-06-21T21:08:51Z
Is this sufficiently fixed?
Comment #4 by yebblies — 2013-11-22T23:38:47Z
???????????
Comment #5 by yebblies — 2014-01-28T22:17:09Z
??????????????????????
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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18518 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB