]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - tests/varargs.qc
Handle all possible subscript errors
[xonotic/gmqcc.git] / tests / varargs.qc
index ffe7d1b6b34b152ffa9b2a12751f6302464a0f70..89cb5b8d6bf5c35781965177441ae6dca756d326 100644 (file)
@@ -9,6 +9,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);
 }