From: Taylor R Campbell Date: Fri, 7 Dec 2018 04:12:03 +0000 (+0000) Subject: Fix bug in flo:make-nan error reporting. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~44 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6d0e0ea40cabe06eb91dafad4aa1476fddfee3c7;p=mit-scheme.git Fix bug in flo:make-nan error reporting. error_bad_range_arg takes argument number, not argument value. --- diff --git a/src/microcode/flonum.c b/src/microcode/flonum.c index d6330b968..051440bcc 100644 --- a/src/microcode/flonum.c +++ b/src/microcode/flonum.c @@ -564,7 +564,7 @@ DEFINE_PRIMITIVE ("FLONUM-MAKE-NAN", Prim_flonum_make_nan, 3, 3, 0) uint64_t i; } u = { .i = 0 }; if ((!quiet) && (payload == 0)) - error_bad_range_arg (payload); + error_bad_range_arg (3); (u.i) |= (sign << 63); (u.i) |= ((UINT64_C (0x7ff)) << 52); (u.i) |= (quiet << 51); diff --git a/tests/runtime/test-flonum.scm b/tests/runtime/test-flonum.scm index 92895ef79..e68e57ce1 100644 --- a/tests/runtime/test-flonum.scm +++ b/tests/runtime/test-flonum.scm @@ -1155,8 +1155,8 @@ USA. (lambda () (flo:logb (flo:negate x)))))) (define-enumerated-test 'flo:make-nan/error - `((#f #f 0 ,expect-error) - (#t #f 0 ,expect-error)) + `((#f #f 0) + (#t #f 0)) (lambda (sign quiet? payload #!optional xfail) (with-expected-failure xfail (lambda ()