Skip to content

Commit

Permalink
compilePkgRef: varRef testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Sep 22, 2021
1 parent c687e2c commit acbb4bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cl/compile_spx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func TestSpxMethod(t *testing.T) {
func onInit() {
sched
broadcast "msg1"
testIntValue = 1
}
`, `
func onInit() {
Expand All @@ -169,6 +170,7 @@ type Game struct {
func (this *Game) onInit() {
spx.Sched()
this.Broadcast__0("msg1")
spx.TestIntValue = 1
}
type bar struct {
Expand Down
4 changes: 4 additions & 0 deletions cl/internal/spx/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ func Sched() {

func SchedNow() {
}

var (
TestIntValue int
)

0 comments on commit acbb4bf

Please sign in to comment.