compiler: disallow named types redeclaration via contract config

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-05-29 18:50:36 +03:00
parent 865bd6c9cc
commit 44dfe8342d
4 changed files with 34 additions and 1 deletions

View file

@ -547,4 +547,7 @@ func TestCompile_GuessEventTypes(t *testing.T) {
t.Run("extended types mismatch", func(t *testing.T) {
check(t, filepath.Join("testdata", "invalid8"), "inconsistent usages of event `SomeEvent`: extended type of param #0 mismatch")
})
t.Run("named types redeclare", func(t *testing.T) {
check(t, filepath.Join("testdata", "invalid9"), "configured declared named type intersects with the contract's one: `invalid9.NamedStruct`")
})
}