Closed lunastorm closed 10 years ago
Consider this example:
type Adder interface { Add(x, y int) int }
The original interface after rewrite will become:
type Adder interface { Add(int) int }
which misses one int argument.
_ifmocks also applies:
func (_m *MockAdder) Add(p0 int) int { ret := _ctrl.Call(_m, "Add", p0) ret0, _ := ret[0].(int) return ret0 } func (_mr *_mock_Adder_rec) Add(p0 interface{}) *gomock.Call { return _ctrl.RecordCall(_mr.mock, "Add", p0) }
This works just fine:
Add(x int, y int) int
Thanks.
A similar issue existed with return values - but that should also be fixed now.
Consider this example:
The original interface after rewrite will become:
which misses one int argument.
_ifmocks also applies:
This works just fine: