common/collections: Fix type checking in Append
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 11 Oct 2018 09:05:30 +0000 (11:05 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 11 Oct 2018 09:24:10 +0000 (11:24 +0200)
commit535755e4f80d96b42a9be05fa85c7827a5e1dbc7
tree57f54bbe7b591a7805697f5d14e9bfbbe3e2c627
parent3583dd6d713c243808b5e8724b32565ceaf66104
common/collections: Fix type checking in Append

The fix introduced in Hugo `0.49.1` had an unintended side-effect in the `Append` func used in both `append` and `.Scratch.Add`.

This commit fixes that by loosen/fixing the type checking so concrete types can be appended to interface slices.

Fixes #5303
common/collections/append.go
common/collections/append_test.go