From f64e4868fdb72cc592226250f02a021fd38b40f5 Mon Sep 17 00:00:00 2001 From: azidar Date: Tue, 18 Aug 2015 16:38:14 -0700 Subject: Fixed width inference for static shift left, #18 --- src/main/stanza/passes.stanza | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza index e9e9c8f0..b8bd572a 100644 --- a/src/main/stanza/passes.stanza +++ b/src/main/stanza/passes.stanza @@ -1867,6 +1867,9 @@ defn solve-constraints (l:List) -> HashTable : ;println-all-debug(["Removing cycle for " n " inside " w]) val w* = match(map(remove-cycle{n,_},w)) : (w:MaxWidth) : MaxWidth(to-list(filter({_ != VarWidth(n)},args(w)))) + (w:MinusWidth) : + if arg1(w) == VarWidth(n) : arg1(w) + else : w (w) : w ;println-all-debug(["After removing cycle for " n ", returning " w*]) w* -- cgit v1.2.3