Debian Codegraph @

gcc/testsuite/gdc.dg/pr96156b.d

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