Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ld
go-ld-prime
Commits
58cad300
Commit
58cad300
authored
Nov 13, 2020
by
Will Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check for struct sufficiency
parent
4155593e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
schema/gen/go/genStruct.go
schema/gen/go/genStruct.go
+3
-1
No files found.
schema/gen/go/genStruct.go
View file @
58cad300
...
...
@@ -507,7 +507,9 @@ func (g structBuilderGenerator) emitMapAssemblerMethods(w io.Writer) {
case maState_finished:
panic("invalid state: Finish cannot be called on an assembler that's already finished")
}
//FIXME check if all required fields are set
if ma.s & fieldBits__{{ $type | TypeSymbol }}_sufficient != fieldBits__{{ $type | TypeSymbol }}_sufficient {
panic("invalid state: Not all required fields set")
}
ma.state = maState_finished
*ma.m = schema.Maybe_Value
return nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment