Closed porky11 closed 7 years ago
On Tue, Sep 13, 2016 at 02:58:38PM -0700, Fabio Krapohl wrote:
Another array problem,
(def main (fn extern-c void (void) (def x (var auto (array-of 2 int) (array 0 0))) (def y (var auto (array-of 2 int) x)) (return))) ;;error: expected expression with type (array-of 2 int) (got type (p int) instead)
x has been casted to (p int) and I have to cast it back to (array-of 2 int)
Although casts to arrays were permitted, the implementation did not work properly. For uniformity with C/C++, these casts have now been removed. However, arrays can now be initialised by way of other arrays of the same size and type, so that the above works as expected.
Another array problem,
x has been casted to (p int) and I have to cast it back to (array-of 2 int)