[Issue 8315] New: Invalid nested-ref check in template constraint
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 28 22:21:56 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8315
Summary: Invalid nested-ref check in template constraint
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-06-28 22:24:28 PDT ---
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)) {}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list