]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - tests/varargs.qc
make sure missing return values still warn
[xonotic/gmqcc.git] / tests / varargs.qc
index ffe7d1b6b34b152ffa9b2a12751f6302464a0f70..4b0d80686e079be78b63f3c0a2f95e0768062a83 100644 (file)
@@ -1,6 +1,3 @@
-void(string...)   print  = #1;
-string(float)     ftos   = #2;
-
 void nbva(float a, string...count) {
     print("You gave me ", ftos(count), " additional parameters\n");
     print("First: ", ...(0, string), "\n");
@@ -9,6 +6,15 @@ void nbva(float a, string...count) {
         print("Vararg ", ftos(a), " = ", ...(a, string), "\n");
 }
 
+var void unstable(...);
+void stability(float a, float b, ...count)
+{
+    print("Got: ", ftos(count), "\n");
+}
+
 void main() {
     nbva(1, "Hello", "You", "There");
+    stability(1, 2, 3, 4, 5);
+    unstable = stability;
+    unstable(1, 2, 3, 4, 5);
 }