Fix internal constructor name for struct:' so that
struct-out' works.
Closes PR 12447 Related to PR 12516 original commit: c16e48a08316ee464b59d6c6f992a7f31b7726e4
This commit is contained in:
parent
719c959418
commit
2051b79030
|
@ -0,0 +1,8 @@
|
|||
#lang typed/racket
|
||||
|
||||
(struct: x ())
|
||||
(define-struct: y ())
|
||||
|
||||
(x) (y)
|
||||
|
||||
(provide (struct-out x) (struct-out y))
|
|
@ -394,7 +394,7 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
(syntax-parse stx
|
||||
[(_ vars:maybe-type-vars nm:struct-name/new (fs:fld-spec ...) . opts)
|
||||
(let ([mutable (mutable? #'opts)]
|
||||
[cname (datum->syntax #f (syntax-e #'nm.name))])
|
||||
[cname (datum->syntax #f (format-symbol "make-~a" (syntax-e #'nm.name)))])
|
||||
(with-syntax ([d-s (syntax-property (quasisyntax/loc stx
|
||||
(struct #,@(attribute nm.new-spec) (fs.fld ...)
|
||||
#:extra-constructor-name #,cname
|
||||
|
|
Loading…
Reference in New Issue
Block a user