]>
Commit | Line | Data |
---|---|---|
5fee5ec3 IB |
1 | // https://issues.dlang.org/show_bug.cgi?id=17512 |
2 | ||
3 | struct A | |
4 | { | |
5 | int _value; | |
6 | ||
7 | bool _hasValue; | |
8 | ||
9 | auto ref getOr(int alternativeValue) | |
10 | { | |
11 | return _hasValue ? _value : alternativeValue; | |
12 | } | |
13 | } | |
14 | ||
15 | A a; | |
16 | ||
17 | // https://issues.dlang.org/show_bug.cgi?id=18661 | |
18 | ||
19 | struct S0(T) | |
20 | { | |
21 | int a; | |
22 | auto ref immutable(int) getA() { return a; } | |
23 | } | |
24 | ||
25 | alias B = S0!int; | |
26 |