id summary reporter owner description type status priority milestone component version resolution keywords cc 860 opAssign in FilePath keinfarbton kris \r\nFrom [http://digitalmars.com/d/1.0/operatoroverloading.html] [[br]]\r\n''The assignment operator cannot be overloaded for rvalues that can be implicitly cast to the lvalue type.''\r\n\r\nDoing so results in a compiler error. But doing it via an alias, as done in tango.io.FilePath, the compiler does not complain.\r\n\r\nBut trying to nullify a ref result in compile error:\r\n{{{\r\n#!d\r\nauto fp = new FilePath( "/tmp" );\r\nfp = null;\r\n}}}\r\n{{{\r\nt.d(14): Error: overloads FilePath(FilePath path) and FilePath(char[] path) both match argument list for set\r\nt.d(14): function tango.io.FilePath.FilePath.set called with argument types:\r\n (void*)\r\nmatches both:\r\n tango.io.FilePath.FilePath.set(FilePath)\r\nand:\r\n tango.io.FilePath.FilePath.set(char[])\r\n}}}\r\n\r\n\r\n defect closed major 0.99.9 Tango 0.99.4 Frank fixed