fixed PR 8737
svn: r6596
This commit is contained in:
parent
cbe5d87131
commit
3857b95a7b
|
@ -174,7 +174,8 @@ improve method arity mismatch contract violation error messages?
|
|||
[(null? clauses) null]
|
||||
[else
|
||||
(let ([clause (car clauses)])
|
||||
(syntax-case clause (struct rename)
|
||||
;; compare raw identifiers for `struct' and `rename' just like provide does
|
||||
(syntax-case* clause (struct rename) (λ (x y) (eq? (syntax-e x) (syntax-e y)))
|
||||
[(rename this-name new-name contract)
|
||||
(and (identifier? (syntax this-name))
|
||||
(identifier? (syntax new-name)))
|
||||
|
|
|
@ -5088,6 +5088,18 @@ so that propagation occurs.
|
|||
(eval 'pc19-ans))
|
||||
1)
|
||||
|
||||
;; test that unit & contract don't collide over the name `struct'
|
||||
(test/spec-passed
|
||||
'provide/contract20
|
||||
'(eval '(module tmp mzscheme
|
||||
(require (lib "contract.ss")
|
||||
(lib "unit.ss"))
|
||||
|
||||
(define-struct s (a b))
|
||||
|
||||
(provide/contract
|
||||
[struct s ([a number?]
|
||||
[b symbol?])]))))
|
||||
|
||||
(contract-error-test
|
||||
#'(begin
|
||||
|
|
Loading…
Reference in New Issue
Block a user