]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/test17512.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / test17512.d
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