Changeset 13968 in project


Ignore:
Timestamp:
03/27/09 15:52:35 (11 years ago)
Author:
felix winkelmann
Message:

a few fixes

Location:
chicken/branches/scrutiny
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/scrutiny/TODO

    r13965 r13968  
    104104*** using "touch" with WINDOWS_SHELL won't work (need alternative)
    105105*** extend scripts/guess-platforms.sh for more platforms
     106*** is the Mac build properly working?
    106107
    107108** documentation
  • chicken/branches/scrutiny/scrutinizer.scm

    r13967 r13968  
    136136         loc "of type boolean" "a result that is always true"
    137137         "value"
    138          (sprintf "in conditional `~s', " (fragment x))))
     138         (sprintf "in conditional `~s'," (fragment x))))
    139139      f))
    140140  (define (typename t)
     
    286286     loc
    287287     (sprintf
    288       "~a~a~a"
     288      "~a~a~a~a"
    289289      (or desc "")
     290      (if desc " " "")
    290291      (if expected
    291           (sprintf "expected ~a~a~a" what (and what " ") expected)
     292          (sprintf "expected ~a~a~a" (or what "") (and what " ") expected)
    292293          "")
    293294      (sprintf ", but where given ~a" given))))
     
    315316               (map (lambda (x)
    316317                      (if (and (list? x) (any pair? x))
    317                           '...
     318                          '(...)
    318319                          x))
    319320                    x1)))
     
    321322  (define (call-result args e loc x)
    322323    (define (pname)
    323       (sprintf "in procedure call to `~s' " (fragment x)))
     324      (sprintf "in procedure call to `~s'" (fragment x)))
    324325    (d "call-result: ~a (~a)" args loc)
    325326    (let ((ptype (car args))
     
    392393                       (let ((r1 (walk (second subs) e loc dest))
    393394                             (r2 (walk (third subs) e loc dest)))
    394                          (when (and (not (eq? r1 '*)) (not (eq? '* r2))
    395                                     (not (= (length r1) (length r2))))
    396                            (report1
    397                             loc
    398                             "branches in conditional expression differ in the number of results"))
    399                          (map (lambda (t1 t2) (simplify `(or ,t1 ,t2)))
    400                               r1 r2))))
     395                         (cond ((and (not (eq? r1 '*)) (not (eq? '* r2)))
     396                                (when (not (= (length r1) (length r2)))
     397                                  (report1
     398                                   loc
     399                                   "branches in conditional expression differ in the number of results"))
     400                                (map (lambda (t1 t2) (simplify `(or ,t1 ,t2)))
     401                                     r1 r2))
     402                               (else '*)))))
    401403               ((let)
    402404                (let ((t (single (walk (first subs) e loc (first params)) loc)))
Note: See TracChangeset for help on using the changeset viewer.