Added counter-stability test to the varargs testcase

This commit is contained in:
Wolfgang Bumiller 2013-01-17 10:32:43 +01:00
parent 1410840ef6
commit 8697fa59f3
2 changed files with 11 additions and 0 deletions

View 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);
}

View file

@ -8,3 +8,5 @@ M: You chose: You
M: Vararg 0 = Hello
M: Vararg 1 = You
M: Vararg 2 = There
M: Got: 3
M: Got: 3