nimskull icon indicating copy to clipboard operation
nimskull copied to clipboard

disallow `sink openArray[T]` types

Open zerbina opened this issue 1 year ago • 5 comments

Summary

No specification for how sink openArray[T] should work exists, and the current implementation only works without issues in the simple case where the argument is a literal array-constructor expression that is not constant.

For most other cases, either the seq or string used as the argument are not cleaned up or, for constant expression, a segmentation fault occurs at run-time when trying to mutate the openArray.

Passing an immutable openArray to a sink openArray, while in theory supported, also results in a run-time error.

Details

  • remove the "cannot create implicit openArray` report; it's unused now
  • disable the test that made use of sink openArray

zerbina avatar Feb 15 '23 16:02 zerbina