Bug 14357 – Match on specType does not check the conflict with already deduced template arguments

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-28T16:41:00Z
Last change time
2015-06-17T21:03:52Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
shammah.chancellor

Comments

Comment #0 by shammah.chancellor — 2015-03-28T16:41:59Z
SDC errors as follows: ``` > ../bin/sdc test0128.d return Qux!(float**, int*); ^~~~~~~~~~~~~~~~~~~~ test0128.d:10: error: No match ``` DMD compiles this erroneously: ```test0128.d //T compiles:no //T has-passed:yes // Test invalid specialisation. template Qux(T : U*, U : V*, V) { enum Qux = T.sizeof + V.sizeof; } int main() { return Qux!(float**, int*); } ```
Comment #1 by k.hara.pg — 2015-03-29T04:47:31Z
Comment #2 by ketmar — 2015-03-29T10:18:00Z
the patch seems to break std.bitmanip unittests: bitmanip.d(284): Error: template instance taggedPointer!(uint*, "x", bool, "b1", 1, bool, "b2", 1) does not match template declaration taggedPointer(T : T*, string name, Ts...) bitmanip.d(396): Error: template instance taggedPointer!(int*, "a", uint, "b", 2) does not match template declaration taggedPointer(T : T*, string name, Ts...)
Comment #3 by k.hara.pg — 2015-03-29T10:39:03Z
(In reply to Ketmar Dark from comment #2) > the patch seems to break std.bitmanip unittests: > > bitmanip.d(284): Error: template instance taggedPointer!(uint*, "x", bool, > "b1", 1, bool, "b2", 1) does not match template declaration taggedPointer(T > : T*, string name, Ts...) > bitmanip.d(396): Error: template instance taggedPointer!(int*, "a", uint, > "b", 2) does not match template declaration taggedPointer(T : T*, string > name, Ts...) The first version had a bug so it broke dmd test suite. then I updated pull request to fix the issues.
Comment #4 by ketmar — 2015-03-29T11:25:10Z
thank you. it's a pity that bugzilla has no notifications about patch updates...
Comment #5 by github-bugzilla — 2015-04-01T04:24:12Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/94f89154f92ec87161e0dc5f300877a57924f141 fix Issue 14357 - Match on specType does not check the conflict with already deduced template arguments https://github.com/D-Programming-Language/dmd/commit/e52882477ff8f0f3fa9f653ec54d806a3bd7f508 Merge pull request #4530 from 9rnsr/fix14357 Issue 14357 - Match on specType does not check the conflict with already deduced template arguments
Comment #6 by github-bugzilla — 2015-06-17T21:03:52Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/94f89154f92ec87161e0dc5f300877a57924f141 fix Issue 14357 - Match on specType does not check the conflict with already deduced template arguments https://github.com/D-Programming-Language/dmd/commit/e52882477ff8f0f3fa9f653ec54d806a3bd7f508 Merge pull request #4530 from 9rnsr/fix14357