You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @fatih, I checked out back to your original PR and then bisected from there and this never evaluated directly to a bool. The logic has always been:
If just a list, evaluate to a list.
If just a map, evaluate to a map.
Otherwise, string.
I'm not sure what the effect would be here of returning other primitives directly (int, bool, etc). So while I don't disagree, I'd want to think that through first... especially for Terraform.
Thanks for the lookup. Weird that I've remember that it was returning ast.TypeBool, but you're right that it indeed returns the ast.TypeString (I've just reread the src code from that PR and it's indeed like that).
I think it would be valuable to make it correct and if we could revisit this as well while we're at fixing a lot of issues as well (such as #42). I leave it up to you. Feel free to close this or let's have this open as a reminder.
Hi,
The following snippet doesn't return
ast.TypeBool
anymore:https://play.golang.org/p/fc9xgAcIvp
Instead it returns:
It should return
TypeBool
The text was updated successfully, but these errors were encountered: