Skip to content

Commit

Permalink
Add missing bool case
Browse files Browse the repository at this point in the history
  • Loading branch information
paultyng committed Jun 24, 2019
1 parent 8f29e2e commit ebea080
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lang/funcs/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,10 @@ var LookupFunc = function.New(&function.Spec{
return cty.StringVal(v.AsString()), nil
case ty.Equals(cty.Number):
return cty.NumberVal(v.AsBigFloat()), nil
case ty.Equals(cty.Bool):
return cty.BoolVal(v.True()), nil
default:
return cty.NilVal, errors.New("lookup() can only be used with flat lists")
return cty.NilVal, errors.New("lookup() can only be used with maps of primitive types")
}
}
}
Expand Down

0 comments on commit ebea080

Please sign in to comment.