diff --git a/collects/tests/typed-racket/succeed/struct-struct-out.rkt b/collects/tests/typed-racket/succeed/struct-struct-out.rkt new file mode 100644 index 0000000000..87c8c396d5 --- /dev/null +++ b/collects/tests/typed-racket/succeed/struct-struct-out.rkt @@ -0,0 +1,8 @@ +#lang typed/racket + +(struct: x ()) +(define-struct: y ()) + +(x) (y) + +(provide (struct-out x) (struct-out y)) diff --git a/collects/typed-racket/base-env/prims.rkt b/collects/typed-racket/base-env/prims.rkt index aeebad6f12..961bfbd26f 100644 --- a/collects/typed-racket/base-env/prims.rkt +++ b/collects/typed-racket/base-env/prims.rkt @@ -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