attributes and properties lookup order

ikod via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 26 15:44:55 PST 2016


Hello

$ cat t.d

import std.net.curl: get;

void main() {
     string[string] x;
     string y = x.get("","");
}

$ dmd t.d
t.d(6): Error: template std.net.curl.get cannot deduce function 
from argument types !()(string[string], string, string), 
candidates are:
/usr/include/dmd/phobos/std/net/curl.d(527):        
std.net.curl.get(Conn = AutoProtocol, T = char)(const(char)[] 
url, Conn conn = Conn()) if (isCurlConn!Conn && (is(T == char) || 
is(T == ubyte)))

It is strange that AA property 'get' is not considered first.


More information about the Digitalmars-d-learn mailing list