From 14d1e424b6a582d021c73c88e1f0c5f0962ecc9d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 23 Jan 2018 11:05:51 +0100 Subject: pkg/compiler: allow use of empty strings This comes up in several contexts in netfilter. --- pkg/compiler/check.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/compiler/check.go') diff --git a/pkg/compiler/check.go b/pkg/compiler/check.go index 5d741effc..eb2a13e19 100644 --- a/pkg/compiler/check.go +++ b/pkg/compiler/check.go @@ -802,7 +802,7 @@ func checkTypeKind(t *ast.Type, kind int) (unexpected string, expect string, ok switch { case kind == kindAny: ok = true - case t.String != "": + case t.HasString: ok = kind == kindString if !ok { unexpected = fmt.Sprintf("string %q", t.String) -- cgit mrf-deployment