"Fossies" - the Fresh Open Source Software Archive

Member "dmd-2.089.1/test/fail_compilation/fail18985.d" (14 Dec 2019, 332 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 /*
    2 TEST_OUTPUT:
    3 ---
    4 fail_compilation/fail18985.d(16): Error: `foo` is not a scalar, it is a `object.Object`
    5 fail_compilation/fail18985.d(17): Error: `bar` is not a scalar, it is a `shared(Object)`
    6 ---
    7 */
    8 
    9 // https://issues.dlang.org/show_bug.cgi?id=18985
   10 
   11 Object foo;
   12 shared Object bar;
   13 
   14 void main()
   15 {
   16     foo += 1;
   17     bar += 1;
   18 }