Support variadic provider and injector functions (#91)

Fixes #61
This commit is contained in:
shantuo
2018-12-03 08:30:42 -08:00
committed by Ross Light
parent 65d810f60a
commit ef9bb67152
8 changed files with 100 additions and 4 deletions

View File

@@ -57,6 +57,9 @@ type call struct {
// This will be nil for kind == valueExpr.
args []int
// varargs is true if the provider function is variadic.
varargs bool
// fieldNames maps the arguments to struct field names.
// This will only be set if kind == structProvider.
fieldNames []string
@@ -192,6 +195,7 @@ dfs:
pkg: p.Pkg,
name: p.Name,
args: args,
varargs: p.Varargs,
fieldNames: p.Fields,
ins: ins,
out: curr.t,