Bug 8315 – Invalid nested-ref check in template constraint

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-28T22:24:00Z
Last change time
2012-06-29T13:55:34Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-06-28T22:24:28Z
This bug is introduced by the fix issue 8241. Reported by @meh in github. https://github.com/D-Programming-Language/dmd/pull/1006#issuecomment-6646067 > This pull broke something. > > I didn't manage to get a reduced testcase but I get this error: > > nucular/protocols/http/headers.d(65): Error: template std.algorithm.countUntil does not match any function template declaration > /usr/include/d/std/algorithm.d(3801): Error: template std.algorithm.countUntil cannot deduce template function from argument types !(__lambda4)(Header[]) > nucular/protocols/http/headers.d(65): Error: template instance countUntil!(__lambda4) errors instantiating template > When compiling _internal = _internal.remove(_internal.countUntil!(a => a.name == name));. > > The incriminating commit is 6cf404d, before that it compiles properly. Reduced test case: void main() { bool b; foo!(a => b)(); } void foo(alias pred)() if (is(typeof(pred(1)) == bool)) {}
Comment #1 by k.hara.pg — 2012-06-28T22:39:58Z
Comment #2 by github-bugzilla — 2012-06-29T11:54:02Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cdcf6451553f49509dabe9fa363996ae4e8e1e7b fix Issue 8315 - Invalid nested-ref check in template constraint https://github.com/D-Programming-Language/dmd/commit/ec5d4da9ac7c8ed6b0ef7c75765b0624aa67a994 Merge pull request #1029 from 9rnsr/fix8315 [Regression git] Issue 8315 - Invalid nested-ref check in template constraint