internal/shader: add a test for type shadowing

This commit is contained in:
Hajime Hoshi 2022-09-24 19:00:23 +09:00
parent 7f91a681e3
commit 1703297f37

View File

@ -2389,6 +2389,7 @@ func TestTypeRedeclaration(t *testing.T) {
}{
{stmt: "type Foo int; type Foo int", err: true},
{stmt: "type Foo int; type Foo float", err: true},
{stmt: "type Foo int; { type Foo int }", err: false},
{stmt: "type Foo int; type Bar int", err: false},
}