]> git.draconx.ca Git - cdecl99.git/blobdiff - tests/decl-good.at
libcdecl: Fix parsing of very long parameter lists.
[cdecl99.git] / tests / decl-good.at
index df570c8807c1800852d7e6530b7f725e2e63d1ba..bb3c16806a8648584d399e61143f2a7f0d007319 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright © 2020-2021, 2023 Nick Bowler
+# Copyright © 2020-2021, 2023-2024 Nick Bowler
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -120,6 +120,22 @@ SIMPLE_DECLS(
   [[int @<:@n@:>@],  [type variable-length array n of int]],
   [[int @<:@*@:>@],  [type variable-length array of int]])
 
+SIMPLE_DECLS(
+  [[int f(a, b)],   [declare f as function (a, b) returning int]],
+  [[int f(int, b)], [declare f as function (int, b) returning int]],
+  [[int f(a, int)], [declare f as function (a, int) returning int]],
+  [[int (a, b)],    [type function (a, b) returning int]],
+  [[int (int, b)],  [type function (int, b) returning int]],
+  [[int (a, int)],  [type function (a, int) returning int]])
+
+SIMPLE_DECLS(
+  [[int f(a, b, ...)],   [declare f as function (a, b, ...) returning int]],
+  [[int f(int, b, ...)], [declare f as function (int, b, ...) returning int]],
+  [[int f(a, int, ...)], [declare f as function (a, int, ...) returning int]],
+  [[int (a, b, ...)],    [type function (a, b, ...) returning int]],
+  [[int (int, b, ...)],  [type function (int, b, ...) returning int]],
+  [[int (a, int, ...)],  [type function (a, int, ...) returning int]])
+
 SIMPLE_DECLS_EXPLAIN(
   [[int ((int))], [type function (int) returning int], [int (int)]],
   [[int (x(int))], [declare x as function (int) returning int], [int x(int)]],