What are the differences between these forms of function-like declarations ?

anonymous anonymous at example.com
Thu Sep 6 23:13:39 PDT 2012


On Friday, 7 September 2012 at 05:56:18 UTC, Anderel Cerol wrote:
> I coded like this :
> auto func ={
> ......
> };
> import std.functional;
> func.toDelegate(); //doesn't work ,shows "undefined identifier 
> toDelegate "
> toDelegate(func); //works.

Looks like scoped imports don't play nicely with UFCS. Put the
import in module scope and it works. Of course, that's just a
workaround, and you should report it as a bug.


More information about the Digitalmars-d mailing list