Files
releases/types
Torin Sandall 40bdc42fba types: Fix panic on reference to object with composite key
The type checker was panicing when given a reference to an object with
a composite key because internally it infers the key type using
ast.ValueToInterface (which returns map[string]interface{} and not
map[interface{}]interface{}). This change updates the types package to
support map[string]interface{} internally.

Fixing the TypeOf function resolved the panic but it surfaced another
issue in the type checker where errors were returned if objects or
arrays were dereferenced with composite keys--in case of arrays, the
result is undefined but in the case of objects, this is valid.

Fixes #2648

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2020-08-25 13:32:41 -04:00
..