Fix error message for misuse of #:methods
Closes PR 14069
This commit is contained in:
parent
f6d62b2813
commit
8df734048c
|
@ -43,6 +43,13 @@
|
|||
#:methods gen:foobar
|
||||
[(define foo 0)])
|
||||
'ignore))))
|
||||
;; Test for PR 14069, make sure that the error reports
|
||||
;; the faulty syntax as `bar` and not `#:methods`
|
||||
(check-exn #rx"at: bar"
|
||||
(lambda () (convert-compile-time-error
|
||||
(let ()
|
||||
(struct foo () #:methods bar [])
|
||||
'ignore))))
|
||||
(check-exn #rx"foo: not implemented for 5"
|
||||
(lambda () (let ()
|
||||
(define-generics foobar
|
||||
|
|
|
@ -291,9 +291,10 @@
|
|||
(and (identifier? gen-id)
|
||||
(syntax-local-value gen-id (lambda () #f))))
|
||||
(unless (generic-info? gen-val)
|
||||
(bad "the first argument to the "
|
||||
(bad "the first argument to the"
|
||||
(car p)
|
||||
" is not a name for a generic interface"))
|
||||
" is not a name for a generic interface"
|
||||
(cadr p)))
|
||||
(loop (list* #'#:property
|
||||
(quasisyntax/loc gen-id
|
||||
(generic-property #,gen-id))
|
||||
|
|
Loading…
Reference in New Issue
Block a user