digitalmars.D.learn - Templated aliases name in compilation error output
- Pedro Lacerda (12/29) Feb 11 2012 Hi all,
- Trass3r (1/1) Feb 12 2012 dmd simply doesn't keep those information about aliases.
- Jonathan M Davis (3/4) Feb 12 2012 Exactly.
- Pedro Lacerda (3/7) Feb 13 2012 Would be bad or hard dmd keep those information, and outputs like gcc "a...
- Jonathan M Davis (7/8) Feb 13 2012 It should be quite possible, but I have no idea how hard it would be.
Hi all, When aliases are used I expect to see it names on compile errors. But when I use:struct __Bulk(T) { T[] chunks; } alias __Bulk!(byte) Bulk; alias __Bulk!Bulk MultiBulk;The compilation error for:void question1() { Bulk("bad"); }is:bla.d(12): Error: cannot implicitly convert expression ("bad") of type string to byte[] bla.d(12): Error: structliteral has no effect in expression (__Bulk((__error)))I expected to see (Bulk((__error))) instead of (__Bulk((__error))). And the runtime output error for:void question2() { MultiBulk mb; writeln(typeid(mb)); }is:bla.__Bulk!(__Bulk!(byte)).__BulkDespite in runtime I accept don't see aliases name, if it is needed for accomplish speed. What are your opinions about these erros output? Pedro Lacerda
Feb 11 2012
On Sunday, February 12, 2012 13:00:16 Trass3r wrote:dmd simply doesn't keep those information about aliases.Exactly. - Jonathan M Davis
Feb 12 2012
Would be bad or hard dmd keep those information, and outputs like gcc "aka"? Pedro Lacerda 2012/2/12 Jonathan M Davis <jmdavisProg gmx.com>On Sunday, February 12, 2012 13:00:16 Trass3r wrote:dmd simply doesn't keep those information about aliases.Exactly. - Jonathan M Davis
Feb 13 2012
On Monday, February 13, 2012 19:59:40 Pedro Lacerda wrote:Would be bad or hard dmd keep those information, and outputs like gcc "aka"?It should be quite possible, but I have no idea how hard it would be. Regardless, it's not the kind of change I'd expect anytime soon, because the benefits are relatively minor in comparison to fixing bugs. The source is open on github for anyone to hack at and submit pull requests if they want to though. - Jonathan M Davis
Feb 13 2012