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

functions called without enough args panic #61

Closed
odino opened this Issue Dec 21, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@odino
Copy link
Collaborator

odino commented Dec 21, 2018

Which is kind of ok, just need to return a better message

⧐  a = f(l) { echo(1) }
⧐  a()
panic: runtime error: index out of range

goroutine 1 [running]:
abs/evaluator.extendFunctionEnv(0xc42008c870, 0x0, 0x0, 0x0, 0x7f704b29d000)
	/go/src/abs/evaluator/evaluator.go:456 +0x19f
abs/evaluator.applyFunction(0x5672c0, 0xc42008c870, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/abs/evaluator/evaluator.go:422 +0x1b3
abs/evaluator.Eval(0x566dc0, 0xc420156050, 0xc4200103d0, 0x566dc0, 0xc420156050)
	/go/src/abs/evaluator/evaluator.go:106 +0x1c7
abs/evaluator.Eval(0x566e40, 0xc4200f0120, 0xc4200103d0, 0x566e40, 0xc4200f0120)
	/go/src/abs/evaluator/evaluator.go:35 +0xfb6
abs/evaluator.evalProgram(0xc4201540c0, 0xc4200103d0, 0xc42005fa60, 0x410389)
	/go/src/abs/evaluator/evaluator.go:154 +0xb3
abs/evaluator.Eval(0x5670c0, 0xc4201540c0, 0xc4200103d0, 0x0, 0x0)
	/go/src/abs/evaluator/evaluator.go:29 +0x2b7
abs/repl.Run(0xc4201180f3, 0x3, 0x101)
	/go/src/abs/repl/repl.go:107 +0xdc
abs/repl.executor(0xc4201180f3, 0x3)
	/go/src/abs/repl/repl.go:90 +0x7c
github.com/c-bata/go-prompt.(*Prompt).Run(0xc4200c8000)
	/go/src/github.com/c-bata/go-prompt/prompt.go:73 +0x7b5
abs/repl.Start(0x566a20, 0xc42000e010, 0x566a40, 0xc42000e018)
	/go/src/abs/repl/repl.go:60 +0xec
main.main()
	/go/src/abs/main.go:25 +0x11f
exit status 2
Makefile:11: recipe for target 'repl' failed
make: *** [repl] Error 1

@odino odino added the bug label Dec 21, 2018

@odino odino modified the milestones: future, cauldron, preview-3 Dec 21, 2018

@odino odino closed this in 5a564da Dec 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment