D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9880 - Redundant template instance displaying in error message
Summary: Redundant template instance displaying in error message
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 minor
Assignee: No Owner
URL:
Keywords: diagnostic, pull
Depends on:
Blocks:
 
Reported: 2013-04-04 21:57 UTC by Kenji Hara
Modified: 2013-04-05 03:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2013-04-04 21:57:37 UTC
This invalid code:

void foo(T)(int) if (is(T == int)) {}
void main() { alias f = foo!string; }

Outputs:

test.d(2): Error: template instance foo!(string) foo!(string) does not match template declaration foo(T)(int) if (is(T == int))


"foo!(string)" is displayed twice - it's redundant. Should be:

test.d(2): Error: template instance foo!(string) does not match template declaration foo(T)(int) if (is(T == int))
Comment 2 github-bugzilla 2013-04-05 03:34:20 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3021471e3600a01c8175389dbdde8238bb154332
fix Issue 9880 - Redundant template instance displaying in error message

https://github.com/D-Programming-Language/dmd/commit/c43d21983cc646cb24389b35a208e9fbe50ac7c0
Merge pull request #1845 from 9rnsr/fix9880

Issue 9880 - Redundant template instance displaying in error message