http://d.puremagic.com/issues/show_bug.cgi?id=10437
--- Comment #4 from Kenji Hara <[email protected]> 2013-06-21 06:52:57 PDT --- (In reply to comment #3) > I think the question is misleading. The actual question is how clever the > analysis is. Call-graph information provides a similar scenario: > > import std.stdio; > > void foo() { > writeln("foo"); > } > > void main () {} > // foo is never called > > In such scenarios, deleting a statement might declare a whole chain (actually > DAG) of (template or normal) functions unused. It is a question of taste, if > the user should be flooded with warnings in this case. It's impossible to do that strictly with templates. Let's try to show more suitable case. import std.conv; import std.stdio; auto call(string name, A...)(A args) { return mixin(name~"(args)"); } Until 'call' template function is instantiated, compiler cannot determine which import declaration is actually unused. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
