Skip to content

Commit aad9022

Browse files
committed
When element references simple type it should still be considered to be "string"
Addressing: # github.com/gocomply/scap/pkg/scap/models/oval_def pkg/scap/models/oval_def/models.go:106:20: cannot refer to unexported name oval.string pkg/scap/models/oval_def/models.go:106:20: undefined: oval.string
1 parent eb8f0b4 commit aad9022

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/xsd/element.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (e *Element) ContainsText() bool {
107107
}
108108

109109
func (e *Element) isPlainString() bool {
110-
return e.SimpleType != nil || (e.Type == "" && e.Ref == "" && e.ComplexType == nil)
110+
return e.SimpleType != nil || (e.Type == "" && e.Ref == "" && e.ComplexType == nil) || (e.typ != nil && e.typ.GoTypeName() == "string")
111111
}
112112

113113
func (e *Element) isArray() bool {

0 commit comments

Comments
 (0)