[Issue 20298] Passing field alias to alias predicate doesn't work, predicate needs explicit instantiation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 15 12:59:51 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=20298

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
Thanks for looking at this!

(In reply to RazvanN from comment #1)
> As 
> far as I could tell the lambda template instantion is inside the scope of
> the S struct

Hmm! But, shouldn't it infer that since it doesn't access anything other than
its arguments, it should not have a context?

I see that ipred is typed as a function not delegate.

> you cannot call it from fun, since fun may call only const
> functions and pred is mutable.

Thanks, I actually didn't realize that fun being const was a crucial part of
this. I guess the error message could be better.

--


More information about the Digitalmars-d-bugs mailing list