www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - 'out' keyword, arrays and variadic functions

#    void foo(int[] f, ...) {
#        foreach(int i, TypeInfo ti; _arguments) { }
#    }

#    void bar(out int[] f, ...) {
#        foreach(int i, TypeInfo ti; _arguments) { }
#    }

both functions compile just fine, however if you try to call
'bar' you will get Access Violation.

reason: pointer to typeinfo table is not being pushed, instead of pushing number
of variadic arguments offset of this number is being pushed.
Jul 18 2004