Ignore:
Timestamp:
Oct 15, 2010, 3:15:03 AM (9 years ago)
Author:
gb
Message:

Admit that the macro CCL::REPORT-BAD-ARG has accepted exactly 2 arguments
for the last 20+ years. If the second argument (the typespec) is quoted,
warn at macroexpand time if it looks suspicious.

Fix a handful of cases that were detected by that change. In one
case, introduce a predicate so that EXPT can complain about an
argument whose realpart isn't positive via a SATISFIES type specifier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-float.lisp

    r14224 r14365  
    819819
    820820
     821(defun positive-realpart-p (n)
     822  (> (realpart n) 0))
    821823
    822824(defun expt (b e)
     
    826828         (if (minusp e) (/ 1 (%integer-power b (- e))) (%integer-power b e)))
    827829        ((zerop b)
    828          (if (plusp (realpart e)) b (report-bad-arg e '(number (0) *))))
     830         (if (plusp (realpart e)) b (report-bad-arg e '(satisfies positive-realpart-p))))
    829831        ((and (realp b) (plusp b) (realp e))
    830832         (if (or (typep b 'double-float)
Note: See TracChangeset for help on using the changeset viewer.