Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parsetoml: support compiling with strictFuncs again
Nim 1.6.0 added [1] an opt-in for the `strictEffects` behavior, which will become the default in Nim 2.0 [2]. Parsetoml was changed to support compiling with strictEffects [3], but we could no longer compile with strictFuncs: $ nim c --experimental:strictFuncs src/parsetoml.nim /tmp/parsetoml/src/parsetoml.nim(1742, 6) Error: '==' can have side effects > /tmp/parsetoml/src/parsetoml.nim(1769, 22) Hint: '==' calls `.sideEffect` '[]' >> /foo/nim-devel/lib/pure/collections/tables.nim(1851, 6) Hint: '[]' called by '==' Add an override so that strictFuncs doesn't complain about the `func`. Simply changing the `func` to a `proc` doesn't work. Note that the definition of strictFuncs was recently changed [4]. Closes: #61 [1] https://nim-lang.org/blog/2021/10/19/version-160-released.html#strict-effects [2] nim-lang/Nim@1e15f975b839 [3] bb90361, "patches for strict effects", 2022-10-24 [4] https://forum.nim-lang.org/t/9716
- Loading branch information