]> git.ipfire.org Git - thirdparty/gcc.git/blame - 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
CommitLineData
5fee5ec3
IB
1// https://issues.dlang.org/show_bug.cgi?id=17512
2
3struct 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
15A a;
16
17// https://issues.dlang.org/show_bug.cgi?id=18661
18
19struct S0(T)
20{
21 int a;
22 auto ref immutable(int) getA() { return a; }
23}
24
25alias B = S0!int;
26