Commit 6bee60d0
6bee60d084e6Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 5 files · +3 added · ~2 modified
Description
Merge pull request #1444 from rubys/fix-void-call-as-proc-tail
codegen: emit a void-typed proc tail as a statement, not return
Details
- Commit
- 6bee60d084e6
- Parent
- 7ff9c36b718d
- Merge parent
- c185dd8f0a30
MakefilemodifiedView file
@@ -354,6 +354,12 @@
354354
"$$tmp/b" > "$$tmp/b.out" 2>/dev/null; \355355
cmp -s "$$tmp/b.out" test/rbs-seed/boundary.expected || { echo "rbs-seed-test: FAIL (#1417 boundary output mismatch)"; diff -u test/rbs-seed/boundary.expected "$$tmp/b.out" || true; ok=0; }; \356356
else echo "rbs-seed-test: FAIL (#1417 boundary coercion C did not compile)"; ok=0; fi; \357+
$(SPINEL) test/rbs-seed/void_block_tail.rb --rbs test/rbs-seed/sig \358+
-c --no-line-map -o "$$tmp/v.c" 2>/dev/null; \359+
if $(CC) -O0 -Ilib "$$tmp/v.c" $(SP_RT_LIB) -lm -o "$$tmp/v" 2>"$$tmp/v.err"; then \360+
"$$tmp/v" > "$$tmp/v.out" 2>/dev/null; \361+
cmp -s "$$tmp/v.out" test/rbs-seed/void_block_tail.expected || { echo "rbs-seed-test: FAIL (void block tail output mismatch)"; diff -u test/rbs-seed/void_block_tail.expected "$$tmp/v.out" || true; ok=0; }; \362+
else echo "rbs-seed-test: FAIL (void-returning call as proc tail: C did not compile)"; ok=0; fi; \357363
rm -rf "$$tmp"; \358364
if [ $$ok -eq 1 ]; then echo "rbs-seed-test: pass"; else exit 1; fi359365
endifsrc/codegen.cmodifiedView file
Loading diff…
test/rbs-seed/sig/void_block_tail.rbsaddedView file
Loading diff…
test/rbs-seed/void_block_tail.expectedaddedView file
Loading diff…
test/rbs-seed/void_block_tail.rbaddedView file
Loading diff…