compiler: allow unnamed params for exported methods

Adjust the result of #2601.
This commit is contained in:
Anna Shaleva 2022-08-17 12:23:31 +03:00
parent 5d5455312a
commit 171364f07f
2 changed files with 12 additions and 2 deletions

View file

@ -417,4 +417,13 @@ func TestUnnamedParameterCheck(t *testing.T) {
_, _, err := compiler.CompileWithOptions("test.go", strings.NewReader(src), nil)
require.NoError(t, err)
})
t.Run("method with unnamed params", func(t *testing.T) {
src := `
package testcase
type A int
func (rsv A) OnNEP17Payment(_ string, _ int, iface interface{}){}
`
_, _, err := compiler.CompileWithOptions("test.go", strings.NewReader(src), nil)
require.NoError(t, err) // it's OK for exported method to have unnamed params as it won't be included into manifest
})
}