diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-07-09 17:05:17 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-07-16 15:20:33 +0200 |
| commit | 9ba1e9ae4bfd1e74250db02c5214dca1e9a58814 (patch) | |
| tree | e6397fa439f47f5eefb689737e63116ba406f5c9 /prog/minimization.go | |
| parent | e2b11c0ada31e485f7f065a600643dea5c8f5680 (diff) | |
prog: fix updating triedPaths when minimizing resources
Diffstat (limited to 'prog/minimization.go')
| -rw-r--r-- | prog/minimization.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/prog/minimization.go b/prog/minimization.go index fd81a7252..9dad3a494 100644 --- a/prog/minimization.go +++ b/prog/minimization.go @@ -223,11 +223,11 @@ func (typ *ResourceType) minimize(ctx *minimizeArgsCtx, arg Arg, path string) bo a.Res, a.Val = nil, typ.Default() if ctx.pred(ctx.p, ctx.callIndex0) { *ctx.p0 = ctx.p - ctx.triedPaths[path] = true - return true + } else { + a.Res, a.Val = r0, 0 + a.Res.uses[a] = true } - a.Res, a.Val = r0, 0 - a.Res.uses[a] = true + ctx.triedPaths[path] = true return true } |
