-
-
Notifications
You must be signed in to change notification settings - Fork 468
Open
Labels
Description
It seems map keys that aren't strings get implicitly converted to string. For example, the following expressions fail unexpectedly
1 in { 1: 0 }
Error:
cannot use int as type string in map key (1:3)
| 1 in {1: 0}
| ..^
{ 1: 0 }[1]
Error:
cannot use int to get an element from map[string]interface {} (1:8)
| {1: 0}[1]
| .......^
This expression evaluates to true
{1: 0} | keys() | first() | type() == "string"
sidju