aboutsummaryrefslogtreecommitdiffstats
path: root/prog/any.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-09-20 14:35:47 +0200
committerAleksandr Nogikh <nogikh@google.com>2023-09-28 09:53:32 +0000
commit746f61e725ad2460e3f101b5e8899105ddea08a1 (patch)
tree16504ca1ef7d98f67d221e59c449266402d84c01 /prog/any.go
parentf73e09b3a31addec5481c03b113a17cc839ded1f (diff)
prog: preserve inout direction during squashing
Prohibit arg direction from being DirIn if other calls use the resource as input. Fix one case where we used to violate it - during argument squashing. Reported-by: John Miller <jm3228520@gmail.com>
Diffstat (limited to 'prog/any.go')
-rw-r--r--prog/any.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/prog/any.go b/prog/any.go
index 858220440..b99e64932 100644
--- a/prog/any.go
+++ b/prog/any.go
@@ -250,7 +250,6 @@ func (target *Target) squashResult(arg *ResultArg, elems *[]Arg) {
panic("bad")
}
arg.ref = typ.ref()
- arg.dir = DirIn
*elems = append(*elems, MakeUnionArg(target.any.union, DirIn, arg, index))
}