UFCS overrides alias this

Freddy via Digitalmars-d digitalmars-d at puremagic.com
Sun Apr 12 13:19:01 PDT 2015


----test.d
struct A{
	string b;
	alias b this;
}

struct MyRange{
	
}
char front(MyRange);
void popFront(ref MyRange);
bool empty(MyRange);

void test(A a){
	a.empty;
}
----
$ dmd -o- test
test.d(14): Error: function test.empty (MyRange) is not callable 
using argument types (A)
----
Is this intended behavior?


More information about the Digitalmars-d mailing list