aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/pr96156b.d
blob: ae79d568ec6cab892ae49c6cc5c889e6aa307812 (plain)
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);
}