diff --git a/pkgs/racket-doc/syntax/scribblings/name.scrbl b/pkgs/racket-doc/syntax/scribblings/name.scrbl index c9ad9ac6d1..71a8cf0d17 100644 --- a/pkgs/racket-doc/syntax/scribblings/name.scrbl +++ b/pkgs/racket-doc/syntax/scribblings/name.scrbl @@ -8,8 +8,8 @@ @defproc[(syntax-local-infer-name [stx syntax?] [use-local? any/c #t]) any/c]{ Similar to @racket[syntax-local-name], except that @racket[stx] is -checked for an @racket['inferred-name] property that is a symbol -(which overrides any inferred name) or @|void-const|. +checked for an @racket['inferred-name] property +(which overrides any inferred name). If neither @racket[syntax-local-name] nor @racket['inferred-name] produce a name, or if the @racket['inferred-name] property value is @|void-const|, then a name diff --git a/racket/collects/racket/private/name.rkt b/racket/collects/racket/private/name.rkt index 26c5b98609..9a9ccec647 100644 --- a/racket/collects/racket/private/name.rkt +++ b/racket/collects/racket/private/name.rkt @@ -7,7 +7,8 @@ (case-lambda [(stx use-local?) (let-values ([(prop) (simplify-inferred-name (syntax-property stx 'inferred-name))]) - (or (and (symbol? prop) + (or (and prop + (not (void? prop)) prop) (let ([n (and use-local? (not (void? prop))