Make Iterate contain Assign's not Var's

This commit is contained in:
Nigel Tao committed 2018-12-27 10:35:27 +11:00
1 parent cd9ab50f63
commit d552f88738
13 files changed
+91 -91

No files matched your search

+1 -4
View File
@@ -344,15 +344,12 @@ func (g *gen) writeResumeSuspend(b *buffer, f *funk, suspend bool, initBoolTyped
return nil
}
func (g *gen) writeVars(b *buffer, f *funk, skipPointerTypes bool, skipIterateVariables bool, skipNonresumable bool) error {
func (g *gen) writeVars(b *buffer, f *funk, skipPointerTypes bool, skipNonresumable bool) error {
for _, n := range f.varList {
typ := n.XType()
if skipPointerTypes && typ.HasPointers() {
continue
}
if skipIterateVariables && n.IterateVariable() {
continue
}
if skipNonresumable && (f.varResumables == nil || !f.varResumables[n.Name()]) {
continue
}