Skip to content

Implementation of subst method for arrays

Florian Naumann requested to merge bool_purist/ion:feat_impl_subst into master

This pull request is motivated by this issue #1001 (closed)

This implementation of subst method requires that both parameters are array like, aka array, BTree or Map. If the wrong type is supplied then the method raises an error. This behavior is motivated by this comment #1001 (comment 23181) .

Allowing strings as parameter for example would result in either:

  • Implicit array with one element
  • or implicit splitting the string by white space.

That could result in some surprises for the user. I do not think that is a good idea.

Unit tests, integration tests and documentation of method subst are included with this pull request.

No failing of tests via this command and TOOLCHAIN environmental variable set to nightly. Current value for TOOLCHAIN 1.53 does not compile. See issue #1018 (closed) .

make tests
  • tested in redox os.
Edited by Florian Naumann

Merge request reports