-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leading ;
causes a panic
#560
Labels
Comments
I found a similar issue. The continuous semicolon » a=1; -a
#» 0 # invalid: should be -1
» a=1;; -a
#» -1 # works and valid
» a=1;;; -a
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(0xc4201a1500, 0xc420214000, 0x0, 0x0, 0xc4201a1590, 0xc4201a46c0)
/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).compileInfixExpression(0xc4201a1500, 0xc420214000, 0xc4201aa300, 0xc4201a1590, 0xc4201a46c0)
/Users/hachi8833/deve/golang/gopath/sys/src/github.com/goby-lang/goby/compiler/bytecode/expression_generation.go:265 +0xce
github.com/goby-lang/goby/compiler/bytecode.(*Generator).compileExpression(0xc4201a1500, 0xc420214000, 0x4820420, 0xc4201aa300, 0xc4201a1590, 0xc4201a46c0)
/Users/hachi8833/deve/golang/gopath/sys/src/github.com/goby-lang/goby/compiler/bytecode/expression_generation.go:47 +0xc3a
github.com/goby-lang/goby/compiler/bytecode.(*Generator).compileStatement(0xc4201a1500, 0xc420214000, 0x4820240, 0xc4201ae0c0, 0xc4201a1590, 0xc4201a46c0)
/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(0xc4201a1500, 0xc4201ae100, 0x2, 0x2, 0xc4201a1590, 0xc4201a46c0)
/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(0xc4201a1500, 0xc4201ae100, 0x2, 0x2, 0x9, 0xc4201c41c0, 0x15)
/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 See #568. |
@hachi8833 The |
ghost
assigned st0012
Jan 7, 2018
ghost
added
the
in progress
label
Jan 7, 2018
Merged
ghost
removed
the
in progress
label
Jan 7, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the line is started with
;
, the following panic is occurred.The text was updated successfully, but these errors were encountered: