Closed IsaacShelton closed 4 years ago
import VariadicArray import 'sys/cstdio.adept' struct Dummy () func main { dummy Dummy printf('sum = %d\n', dummy.sumEmUp(1, 2, 3, 4, 5)) } func sumEmUp(this *Dummy, integers ...) int { printf('%p\n', integers.items) printf('%p\n', integers.next) printf('%d\n', integers.length as int) printf('%d\n', integers.index as int) printf('%p\n', integers.types) sum int = 0 while integers.hasNext() { if integers.types[integers.index] != typeinfo int { printf('ERROR: sumEmUp() got non-int value!\n') return 0 } x int = integers.readInt() printf('Got value: %d\n', x) sum += x } return sum }
Arguments are not being packaged into a VariadicArray before being passed
VariadicArray
Fixed in commit 99f131c0d8c94682161310439d34eff498df181a
Arguments are not being packaged into a
VariadicArray
before being passed