From 44f66b4026e94ffbb63e7ba1a53f0c5f78a03fea Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 24 Feb 2018 17:00:34 +0100 Subject: prog: return concrete arg types from Make functions This removes a bunch of type assertions and makes code type safer. --- prog/hints_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prog/hints_test.go') diff --git a/prog/hints_test.go b/prog/hints_test.go index a3fd94c62..6648693d3 100644 --- a/prog/hints_test.go +++ b/prog/hints_test.go @@ -162,7 +162,7 @@ func TestHintsCheckDataArg(t *testing.T) { // Whatever type here. It's just needed to pass the // dataArg.Type().Dir() == DirIn check. typ := &ArrayType{TypeCommon{"", "", 0, DirIn, false, true}, nil, 0, 0, 0} - dataArg := MakeDataArg(typ, []byte(test.in)).(*DataArg) + dataArg := MakeDataArg(typ, []byte(test.in)) checkDataArg(dataArg, test.comps, func() { res[string(dataArg.Data())] = true }) -- cgit mrf-deployment