"Fossies" - the Fresh Open Source Software Archive

Member "ldc-1.7.0-src/tests/d2/dmd-testsuite/runnable/imports/a14267.d" (5 Jan 2018, 507 Bytes) of package /linux/misc/ldc-1.7.0-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 }