"Fossies" - the Fresh Open Source Software Archive

Member "dmd-2.089.1/test/runnable/test20025.d" (14 Dec 2019, 314 Bytes) of package /linux/misc/dmd-2.089.1.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 // https://issues.dlang.org/show_bug.cgi?id=20025
    2 /*
    3 TEST_OUTPUT:
    4 ---
    5 ---
    6 */
    7 
    8 struct B
    9 {
   10         static int value = 77;
   11         alias value this;
   12 
   13         this(ref return scope inout B rhs) inout { }
   14 }
   15 
   16 void test(int x)
   17 {
   18         assert(x == 77);
   19 }
   20 
   21 int main()
   22 {
   23         B b;
   24         test(b);
   25 
   26         return 0;
   27 }