"Fossies" - the Fresh Open Source Software Archive

Member "dmd-2.089.0/test/compilable/ddoc10236.d" (2 Nov 2019, 1653 Bytes) of package /linux/misc/dmd-2.089.0.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 // PERMUTE_ARGS:
    2 // REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -wi -o-
    3 
    4 /*
    5 TEST_OUTPUT:
    6 ---
    7 compilable/ddoc10236.d(35): Warning: Ddoc: parameter count mismatch, expected 2, got 1
    8 compilable/ddoc10236.d(47): Warning: Ddoc: function declaration has no parameter 'y'
    9 compilable/ddoc10236.d(59): Warning: Ddoc: function declaration has no parameter 'y'
   10 compilable/ddoc10236.d(59): Warning: Ddoc: parameter count mismatch, expected 1, got 2
   11 compilable/ddoc10236.d(71): Warning: Ddoc: parameter count mismatch, expected 2, got 0
   12 compilable/ddoc10236.d(71):        Note that the format is `param = description`
   13 ---
   14 */
   15 
   16 /***********************************
   17  * foo_good does this.
   18  * Params:
   19  *  x = is for this
   20  *      and not for that
   21  *  y = is for that
   22  */
   23 
   24 void foo_good(int x, int y)
   25 {
   26 }
   27 
   28 /***********************************
   29  * foo_count_mismatch does this.
   30  * Params:
   31  *  x = is for this
   32  *      and not for that
   33  */
   34 
   35 void foo_count_mismatch(int x, int y)   // Warning: Ddoc: parameter count mismatch
   36 {
   37 }
   38 
   39 /***********************************
   40  * foo_no_param_y does this.
   41  * Params:
   42  *  x = is for this
   43  *      and not for that
   44  *  y = is for that
   45  */
   46 
   47 void foo_no_param_y(int x, int z)       // Warning: Ddoc: function declaration has no parameter 'y'
   48 {
   49 }
   50 
   51 /***********************************
   52  * foo_count_mismatch_no_param_y does this.
   53  * Params:
   54  *  x = is for this
   55  *      and not for that
   56  *  y = is for that
   57  */
   58 
   59 void foo_count_mismatch_no_param_y(int x)
   60 {
   61 }
   62 
   63 /***********************************
   64  * foo_count_mismatch_wrong_format does this.
   65  * Params:
   66  *  x : is for this
   67  *      and not for that
   68  *  y : is for that
   69  */
   70 
   71 void foo_count_mismatch_wrong_format(int x, int y)
   72 {
   73 }