]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail4510.d
d: Synchronize testsuite with upstream dmd
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail4510.d
1 // https://issues.dlang.org/show_bug.cgi?id=4510
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/fail4510.d(12): Error: argument type mismatch, `float` to `ref double`
6 ---
7 */
8
9 void main()
10 {
11 float[] arr = [1.0, 2.5, 4.0];
12 foreach (ref double elem; arr) {
13 //elem /= 2;
14 }
15 }