Another Decoration Inference Bug
Copied from Slack:
https://git.sr.ht/~remexre/exps/tree/bd8fcfb96eaeacd53faae72ad889a0d7b9ec2033/item/ableC-ssa/src/xyz.remexre.ssa/SSA.sv.md?view-source#L262 gets a type error,
Case.sv:1073:8: error: Then and else branch must have the same type. Instead they are silver:core:Maybe<(Decorated xyz:remexre:ssa:BasicBlock with {xyz:remexre:ssa:func}, Decorated xyz:remexre:ssa:Stmt with {})> and silver:core:Maybe<(Decorated xyz:remexre:ssa:BasicBlock with {xyz:remexre:ssa:func}, Decorated xyz:remexre:ssa:Stmt with {xyz:remexre:ssa:func})> SSA.sv.md:259:2: error: Expected return type is silver:core:Maybe<(Decorated xyz:remexre:ssa:BasicBlock with {xyz:remexre:ssa:func}, Decorated xyz:remexre:ssa:Stmt with {xyz:remexre:ssa:func})>, but the expression has actual type silver:core:Maybe<(Decorated xyz:remexre:ssa:BasicBlock with {xyz:remexre:ssa:func}, Decorated xyz:remexre:ssa:Stmt with {})>inaccurate location aside, is this right? shouldn't it be taking the
hwithout redecorating it? (changing thewhento anifresults in no change)
Lucas adds:
I've been having trouble reproducing this as a simpler example, but I suspect a substitution threading issue somewhere (since unspecialized possibly-decorated types default to being decorated with the empty set.)
https://git.sr.ht/~remexre/exps/commit/2c83de331a75a39f24727eed957576392f39312a is indeed a workaround.
Possible duplicate of #502.