mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
7c4f532b83
commit
af6072c1b4
@ -4368,6 +4368,16 @@ func TestSyntaxIndex(t *testing.T) {
|
||||
// Issue #3011
|
||||
if _, err := compileToIR([]byte(`package main
|
||||
|
||||
func Foo() float {
|
||||
var a int
|
||||
var b vec4
|
||||
return b[a]
|
||||
}
|
||||
`)); err == nil {
|
||||
t.Error("compileToIR must return an error but did not")
|
||||
}
|
||||
if _, err := compileToIR([]byte(`package main
|
||||
|
||||
func Foo() int {
|
||||
var a int
|
||||
var b ivec4
|
||||
@ -4388,6 +4398,16 @@ func Foo() float {
|
||||
}
|
||||
if _, err := compileToIR([]byte(`package main
|
||||
|
||||
func Foo() float {
|
||||
const a = 0
|
||||
var b vec4
|
||||
return b[a]
|
||||
}
|
||||
`)); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if _, err := compileToIR([]byte(`package main
|
||||
|
||||
func Foo() int {
|
||||
const a = 0
|
||||
var b ivec4
|
||||
|
Loading…
Reference in New Issue
Block a user