struct: syntax error for #:prefab
plus #:authentic
Prior to this change, the combination was documented as a syntax error, but it was only a run-time error --- and not even that as of v8.0 for Racket CS (but it was always a run-time error for BC). Closes #3700
This commit is contained in:
parent
6ae0417468
commit
be7c7755b2
|
@ -499,6 +499,8 @@
|
|||
(syntax-test #'(define-struct a (b c) #:property 1 10 #:prefab))
|
||||
(syntax-test #'(define-struct a (b c) #:sealed #:prefab))
|
||||
(syntax-test #'(define-struct a (b c) #:prefab #:sealed))
|
||||
(syntax-test #'(define-struct a (b c) #:prefab #:authentic))
|
||||
(syntax-test #'(define-struct a (b c) #:authentic #:prefab))
|
||||
|
||||
(define-struct base0 ())
|
||||
(define-struct base1 (a))
|
||||
|
|
|
@ -350,6 +350,8 @@
|
|||
(extend-config config '#:inspector #'#f)
|
||||
nongen?)]
|
||||
[(eq? '#:authentic (syntax-e (car p)))
|
||||
(when nongen?
|
||||
(bad "cannot use" (car p) " for prefab structure type"))
|
||||
(when (lookup config '#:authentic)
|
||||
(bad "multiple" "#:authentic" "s" (car p)))
|
||||
(loop (cdr p)
|
||||
|
@ -403,6 +405,8 @@
|
|||
(bad "cannot use" (car p) " for a sealed structure type"))
|
||||
(when (lookup config '#:guard)
|
||||
(bad "cannot use" (car p) " for a structure type with a guard"))
|
||||
(when (lookup config '#:authentic)
|
||||
(bad "cannot use" (car p) " for an authentic structure type"))
|
||||
(loop (cdr p)
|
||||
(extend-config config '#:inspector #''prefab)
|
||||
#t)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user