diff --git a/Makefile b/Makefile index ffaf43a..374c017 100644 --- a/Makefile +++ b/Makefile @@ -137,6 +137,7 @@ test/example: ${CELL} -d -t riscv tests/examples/panic.cell && ckb-debugger --bin panic | grep "runtime panic: hah" ${CELL} -d -t riscv tests/examples/if-cond.cell && ckb-debugger --bin if-cond | grep "100:0:ss" ${CELL} -d -t riscv tests/examples/return.cell && ckb-debugger --bin return + ${CELL} -d -t riscv tests/examples/named-ret-type.cell && ckb-debugger --bin named-ret-type | grep "0" ${CELL} -d -t riscv tests/examples/func.cell && ckb-debugger --bin func | grep "999" ${CELL} -t riscv tests/examples/cell-data.cell && ckb-debugger --bin cell-data ${CELL} -t riscv tests/examples/inputs.cell && ckb-debugger --bin inputs diff --git a/tests/examples/named-ret-type.cell b/tests/examples/named-ret-type.cell new file mode 100644 index 0000000..bb38102 --- /dev/null +++ b/tests/examples/named-ret-type.cell @@ -0,0 +1,9 @@ +import "debug" +func foo() (ret uint64) { + return +} +func main() { + a := foo() + debug.Printf("%d", a) + return 0 +}