Bug 12586 – redundant error messages for tuple index exceeding

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-16T02:51:00Z
Last change time
2014-04-16T08:29:31Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2014-04-16T02:51:50Z
Test case: alias TypeTuple(T...) = T; alias binaryFun(alias fun) = fun; void main() { int f(int v) { return v; } alias fun = TypeTuple!(f); alias Types = TypeTuple!(int, int); foreach (i, Unused; Types) { binaryFun!(fun[i])(1); } } Prints: --- test.d(14): Error: tuple index 1 exceeds length 1 test.d(14): Error: tuple index 1 exceeds 1 Should be: --- test.d(14): Error: tuple index 1 exceeds length 1
Comment #1 by k.hara.pg — 2014-04-16T03:00:42Z
Comment #2 by github-bugzilla — 2014-04-16T08:29:30Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fa49cdc9ccfc5ce8ba1749144d4c0b3ca7830d77 fix Issue 12586 - redundant error messages for tuple index exceeding https://github.com/D-Programming-Language/dmd/commit/be4eb97848ff5f9abacaea660e69d1265de7f0dd Merge pull request #3458 from 9rnsr/fix12586 Issue 12586 - redundant error messages for tuple index exceeding