tests/dmd/runnable/imports/a14267.d
raw| 1 | module imports.a14267; |
| 2 | |
| 3 | struct SysTime14267 |
| 4 | { |
| 5 | // semantic() is called twice, and its scope is wrongly set to NULL |
| 6 | // at the second call. |
| 7 | this(long stdTime) {} |
| 8 | this(this) {} |
| 9 | ~this() {} |
| 10 | |
| 11 | static SysTime14267 min() |
| 12 | { |
| 13 | // inlining this function will call the semantic3() of SysTime14267 constructor. |
| 14 | // but its 'scope' field is NULL so unintentionally semantic3() call fails. |
| 15 | auto st = SysTime14267(long.min); |
| 16 | auto st2 = st; |
| 17 | return st2; |
| 18 | } |
| 19 | } |