goplus / gop

The Go+ programming language is designed for engineering, STEM education, and data science. Our vision is to enable everyone to become a builder of the digital world.
https://goplus.org
Apache License 2.0
8.96k stars 547 forks source link

执行tutorial chan和计算器会直接报错 #155

Closed ghost closed 6 years ago

ghost commented 6 years ago

系统:mac 版本: go version go1.9.2 darwin/amd64 执行 tutorial chan 错误信息 panic: function not implemented [recovered] panic: line 1: function not implemented [recovered] panic: line 1: function not implemented

goroutine 1 [running]: qlang.io/exec.(Function).ExtCall.func1(0xc4200a6140, 0xc4200dbe28, 0xc42000a0e0) /usr/local/project/src/qlang.io/exec/function.go:188 +0x152 panic(0x1130ae0, 0xc4200565c0) /usr/local/go/src/runtime/panic.go:491 +0x283 qlang.io/exec.(Code).Exec.func1(0xc42007a3f0, 0xc4200a6140) /usr/local/project/src/qlang.io/exec/code.go:580 +0x351 panic(0x1124a80, 0x1176d40) /usr/local/go/src/runtime/panic.go:491 +0x283 qlang.io/spec.dummy1(0x1139180, 0x1243c80, 0xc4200dbca0, 0x1027d89) /usr/local/project/src/qlang.io/spec/spec.go:242 +0x39 qlang.io/exec.tchan.Exec(0x0, 0xc42000a0e0, 0xc4200a6140) /usr/local/project/src/qlang.io/exec/types.go:19 +0x62 qlang.io/exec.(*tchan).Exec(0x12432c8, 0xc42000a0e0, 0xc4200a6140)

:1 +0x50 qlang.io/exec.(*Code).Exec(0xc42007a3f0, 0x0, 0x21, 0xc42000a0e0, 0xc4200a6140) /usr/local/project/src/qlang.io/exec/code.go:589 +0xb1 qlang.io/exec.(*Function).ExtCall(0xc4200dbe38, 0xc4200a6140, 0x0, 0x0, 0x0, 0x0, 0x0) /usr/local/project/src/qlang.io/exec/function.go:191 +0x299 qlang.io/exec.(*Context).ExecBlock(0xc4200a6140, 0x0, 0x21, 0xc42007a3c0) /usr/local/project/src/qlang.io/exec/code.go:340 +0xe2 qlang.io/cl/qlang.(*Qlang).Exec(0xc42000e340, 0xc4200aa000, 0x14f, 0x34f, 0x0, 0x0, 0x0, 0x0) /usr/local/project/src/qlang.io/cl/qlang/engine2.go:144 +0xf0 main.main() /usr/local/project/src/qlang.io/test/main.go:20 +0x90 exit status 2
ghost commented 6 years ago

新手求解答

xushiwei commented 6 years ago

我跟进一下

xushiwei commented 6 years ago

抱歉没有重现你的问题。你是自己重写了 main.go 么(看你的堆栈信息)?