File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,20 @@ See also: [`Libtask.consume`](@ref)
43
43
return x
44
44
end
45
45
46
- function callable_ret_type (sig, types)
46
+ """
47
+ callable_ret_type(sig, produce_types)
48
+
49
+ Computes the types which might possibly be returned from a `TapedTask`, where `sig` is the
50
+ signature (something of the form `Tuple{...}`) of the function from which the `TapedTask` is
51
+ constructed, and `produce_types` are the possible types which such a call might `produce`.
52
+
53
+ In general, computing `produce_types` requires analysing the `produce` type of any statment
54
+ in the IR associated to `sig` which might `produce`. See locations where this function is
55
+ called to see where this happens.
56
+ """
57
+ function callable_ret_type (sig, produce_types)
47
58
produce_type = Union{}
48
- for t in types
59
+ for t in produce_types
49
60
p = isconcretetype (t) ? ProducedValue{t} : ProducedValue{T} where {T<: t }
50
61
produce_type = CC. tmerge (p, produce_type)
51
62
end
You can’t perform that action at this time.
0 commit comments