Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
-
6dba253c
by Raymond Toy at 2025-06-30T08:36:53-07:00
-
4e2e7fec
by Raymond Toy at 2025-06-30T08:36:53-07:00
2 changed files:
Changes:
| ... | ... | @@ -357,15 +357,20 @@ the compiler as completely as possible. Currently this means that |
| 357 | 357 | (when morep
|
| 358 | 358 | (simple-program-error "~@<~s not allowed here~@:>" 'c:&more))
|
| 359 | 359 | (collect ((vars))
|
| 360 | - (labels ((check-var (var)
|
|
| 361 | - (cond ((not (symbolp var))
|
|
| 362 | - (simple-program-error
|
|
| 363 | - "~@<Invalid lambda variable: ~s~@:>" var))
|
|
| 364 | - ((memq var (vars))
|
|
| 365 | - (simple-program-error
|
|
| 366 | - "~@<Repeated lambda variable: ~s~@:>" var))
|
|
| 367 | - (t
|
|
| 368 | - (vars var))))
|
|
| 360 | + (labels ((check-lambda-variable (var)
|
|
| 361 | + (unless (symbolp var)
|
|
| 362 | + (simple-program-error
|
|
| 363 | + "~@<Invalid lambda variable: ~s~@:>" var)))
|
|
| 364 | + (check-var (var)
|
|
| 365 | + (check-lambda-variable var)
|
|
| 366 | + (if (memq var (vars))
|
|
| 367 | + (simple-program-error
|
|
| 368 | + "~@<Repeated lambda variable: ~s~@:>" var)
|
|
| 369 | + (vars var)))
|
|
| 370 | + (check-aux (var)
|
|
| 371 | + (if (consp var)
|
|
| 372 | + (check-lambda-variable (car var))
|
|
| 373 | + (check-lambda-variable var)))
|
|
| 369 | 374 | (check-required (var)
|
| 370 | 375 | (if (and (consp var) specialized-p)
|
| 371 | 376 | (check-var (car var))
|
| ... | ... | @@ -385,7 +390,7 @@ the compiler as completely as possible. Currently this means that |
| 385 | 390 | (mapc #'check-optional optional)
|
| 386 | 391 | (mapc #'check-optional keys)
|
| 387 | 392 | (when restp (check-var rest))
|
| 388 | - (mapc #'check-optional aux)
|
|
| 393 | + (mapc #'check-aux aux)
|
|
| 389 | 394 | (values required optional restp rest keyp keys
|
| 390 | 395 | allow-other-keys-p aux)))))
|
| 391 | 396 |
| ... | ... | @@ -74,7 +74,10 @@ |
| 74 | 74 | (define-defmethod-test-1 defmethod.20 dm2 nil (x))
|
| 75 | 75 | (define-defmethod-test-1 defmethod.21 dm2 nil (x &optional y z))
|
| 76 | 76 | (define-defmethod-test-1 defmethod.22 dm2 nil (x &key y))
|
| 77 | - |
|
| 77 | +(define-defmethod-test-1 defmethod.23 dm2 nil (x y &aux (x x) (y y)))
|
|
| 78 | +(define-defmethod-test-1 defmethod.23 dm2 nil (x y &aux z))
|
|
| 79 | +(define-defmethod-test-1 defmethod.23 dm2 nil (x y &aux z z))
|
|
| 80 | +(define-defmethod-test-1 defmethod.23 dm2 nil (x y &aux z (z z)))
|
|
| 78 | 81 | ;;;
|
| 79 | 82 | ;;; A forward-referenced class used as specializer signaled an
|
| 80 | 83 | ;;; error at some point.
|