Commit 523e9d9
authored
fix dlang/dmd!21476: Presence of move constructor causes overload error (dlang/dmd!21477)
Move constructors were incorrectly being considered as regular
constructors, which resulted in the test case failing with:
```
compilable/test21476.d(12): Error: none of the overloads of `this` are callable using argument types `(string)`
auto o = S21476("aoe");
^
compilable/test21476.d(6): Candidates are: `test21476.S21476.this(ref return scope S21476)`
this(ref return scope S21476);
^
compilable/test21476.d(7): `test21476.S21476.this(return scope S21476)`
this(return scope S21476);
^
```
With this change, a struct literal is now used to construct the object.1 parent 65cf2b6 commit 523e9d9
3 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
1376 | | - | |
| 1376 | + | |
| 1377 | + | |
1377 | 1378 | | |
1378 | 1379 | | |
1379 | 1380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments