diff options
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/compiler/attrs.go | 4 | ||||
| -rw-r--r-- | pkg/compiler/check.go | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/pkg/compiler/attrs.go b/pkg/compiler/attrs.go index dc10dbc9b..d24c38a6d 100644 --- a/pkg/compiler/attrs.go +++ b/pkg/compiler/attrs.go @@ -14,7 +14,9 @@ type attrDesc struct { Name string // For now we assume attributes can have only 1 argument and it's an integer, // enough to cover existing cases. - HasArg bool + HasArg bool + // This function is not invoked for per-field attributes, only for whole + // structs/unions. CheckConsts func(comp *compiler, parent ast.Node, attr *ast.Type) } diff --git a/pkg/compiler/check.go b/pkg/compiler/check.go index 645a73220..b5ced7a13 100644 --- a/pkg/compiler/check.go +++ b/pkg/compiler/check.go @@ -326,10 +326,6 @@ func (comp *compiler) checkAttributeValues() { for _, f := range st.Fields { isOut := hasOutOverlay for _, attr := range f.Attrs { - desc := structFieldAttrs[attr.Ident] - if desc.CheckConsts != nil { - desc.CheckConsts(comp, f, attr) - } switch attr.Ident { case attrOutOverlay.Name: hasOutOverlay = true |
