Skip to content

Leading ; causes a panic #560

Closed
Closed
@hachi8833

Description

When the line is started with ;, the following panic is occurred.

» ;
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x40f99fa]

goroutine 1 [running]:
github.com/goby-lang/goby/compiler/bytecode.(*Generator).compileExpression(0xc4201aefc0, 0xc4201da000, 0x0, 0x0, 0xc4201af050, 0xc4201b0640)
	/Users/hachi8833/deve/golang/gopath/sys/src/github.com/goby-lang/goby/compiler/bytecode/expression_generation.go:9 +0x3a
github.com/goby-lang/goby/compiler/bytecode.(*Generator).compileStatement(0xc4201aefc0, 0xc4201da000, 0x4820240, 0xc42000c080, 0xc4201af050, 0xc4201b0640)
	/Users/hachi8833/deve/golang/gopath/sys/src/github.com/goby-lang/goby/compiler/bytecode/statement_generation.go:40 +0x334
github.com/goby-lang/goby/compiler/bytecode.(*Generator).compileStatements(0xc4201aefc0, 0xc420052050, 0x1, 0x1, 0xc4201af050, 0xc4201b0640)
	/Users/hachi8833/deve/golang/gopath/sys/src/github.com/goby-lang/goby/compiler/bytecode/statement_generation.go:22 +0xd0
github.com/goby-lang/goby/compiler/bytecode.(*Generator).GenerateInstructions(0xc4201aefc0, 0xc420052050, 0x1, 0x1, 0x1, 0xc42001c110, 0xd)
	/Users/hachi8833/deve/golang/gopath/sys/src/github.com/goby-lang/goby/compiler/bytecode/generator.go:54 +0x5b
github.com/goby-lang/goby/igb.StartIgb(0x457257f, 0x5)
	/Users/hachi8833/deve/golang/gopath/sys/src/github.com/goby-lang/goby/igb/repl.go:229 +0xcf4
main.main()
	/Users/hachi8833/deve/golang/gopath/sys/src/github.com/goby-lang/goby/goby.go:29 +0x954

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions