This program does not compile. I think it should do. --- struct X { string m; alias m this; bool opEquals(const X s) const { return true; } } void main() { X* x = new X(""); assert(*x == ""); } --- $ dmd --version DMD64 D Compiler v2.080.1 Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved written by Walter Bright $ dmd test.d test.d(11): Error: function test.X.opEquals(const(X) s) const is not callable using argument types (string) test.d(11): cannot pass argument "" of type string to parameter const(X) s
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19523 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB