module prop; import std.stdio,std.string; enum Etest{ a,b,c,d } typedef int testi = 10; typedef Test Test2; void main(){ assert(22 .toString() == "22"); assert((new Test).test(11)==11); assert(Test.test(11)==11); assert(Test2.test(11)==11); assert(test()==33); assert(prop.test()==33); assert(Etest.d.test()==Etest.d); testi i; assert(i.test()==i.init); } int test(){return 33;}; class Test{ static int test(int i){return i;}; } int test(Etest test){ return cast(int)test; } int test(testi i){ return cast(int)i; }
Created attachment 82 [details] patch
UFCS for all basic types and enums is implemented in dmd 2.059.