aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/check.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-01-23 11:05:51 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-01-23 11:05:51 +0100
commit14d1e424b6a582d021c73c88e1f0c5f0962ecc9d (patch)
tree0fdc71b6e0de2576ae330f145a51f9c016ad81a2 /pkg/compiler/check.go
parentde3e24c4b6cd0136618ce74eb025a15d4834c082 (diff)
pkg/compiler: allow use of empty strings
This comes up in several contexts in netfilter.
Diffstat (limited to 'pkg/compiler/check.go')
-rw-r--r--pkg/compiler/check.go2
1 files changed, 1 insertions, 1 deletions
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)