From f1eedc7a01e2ed3c788662a2950b049cb8a2801c Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 6 Sep 2019 01:48:21 -0400 Subject: [PATCH] lang: Clarify error message about missing field User probably just mistyped a field name. Make that clear. --- lang/structs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/structs.go b/lang/structs.go index 521603e9..1f777f3b 100644 --- a/lang/structs.go +++ b/lang/structs.go @@ -1257,7 +1257,7 @@ func (obj *StmtResField) Unify(kind string) ([]interfaces.Invariant, error) { typ, exists := typMap[obj.Field] if !exists { - return nil, fmt.Errorf("could not determine type for `%s` field of `%s`", obj.Field, kind) + return nil, fmt.Errorf("field `%s` does not exist in `%s`", obj.Field, kind) } invar := &unification.EqualsInvariant{ Expr: obj.Value,