1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
@safe unittest { struct CustomString { @safe: string _impl; @property bool empty() const { return !_impl.length; } } CustomString find(CustomString a, CustomString b) { return CustomString.init; } auto r = find(CustomString("a"), CustomString("b")); assert(r.empty); }