Bug 12280 – Redundant "template instance ... error instantiating" messages

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-28T14:24:00Z
Last change time
2014-03-10T05:49:58Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
dlang-bugzilla

Comments

Comment #0 by dlang-bugzilla — 2014-02-28T14:24:41Z
Consider the program: /////// test.d /////// void f(int i)() { static if (i < 10) f!(i+1); else nonexistent(); } alias f0 = f!0; ////////////////////// When compiled, the compiler output is: test.d(6,3): Error: undefined identifier nonexistent test.d(4,3): Error: template instance test.f!10 error instantiating test.d(9,12): 11 recursive instantiations from here: f!0 test.d(4,3): Error: template instance test.f!9 error instantiating test.d(9,12): 10 recursive instantiations from here: f!0 test.d(4,3): Error: template instance test.f!8 error instantiating test.d(9,12): 9 recursive instantiations from here: f!0 test.d(4,3): Error: template instance test.f!7 error instantiating test.d(9,12): 8 recursive instantiations from here: f!0 test.d(4,3): Error: template instance test.f!6 error instantiating test.d(9,12): 7 recursive instantiations from here: f!0 test.d(4,3): Error: template instance test.f!5 error instantiating test.d(4,3): instantiated from here: f!4 test.d(4,3): instantiated from here: f!3 test.d(4,3): instantiated from here: f!2 test.d(4,3): instantiated from here: f!1 test.d(9,12): instantiated from here: f!0 test.d(4,3): Error: template instance test.f!4 error instantiating test.d(4,3): instantiated from here: f!3 test.d(4,3): instantiated from here: f!2 test.d(4,3): instantiated from here: f!1 test.d(9,12): instantiated from here: f!0 test.d(4,3): Error: template instance test.f!3 error instantiating test.d(4,3): instantiated from here: f!2 test.d(4,3): instantiated from here: f!1 test.d(9,12): instantiated from here: f!0 test.d(4,3): Error: template instance test.f!2 error instantiating test.d(4,3): instantiated from here: f!1 test.d(9,12): instantiated from here: f!0 test.d(4,3): Error: template instance test.f!1 error instantiating test.d(9,12): instantiated from here: f!0 However, only the first 3 lines describe the error adequately. The "template instance ... error instantiating" lines are redundant, as the template instantiation trace is printed already.
Comment #1 by k.hara.pg — 2014-03-10T03:28:46Z
Comment #2 by github-bugzilla — 2014-03-10T05:10:00Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/75356c630f43b8c630ca79cf60d66f3714cfaa72 fix Issue 12280 - Redundant "template instance ... error instantiating" messages https://github.com/D-Programming-Language/dmd/commit/fbffd20a8587888e0dafd8353e6cc23b910932fe Merge pull request #3373 from 9rnsr/fix12280 Issue 12280 - Redundant "template instance ... error instantiating" messages