Skip to content

struct-info-wrapper does not implement prop:struct-field-info #1115

Open
@mxork

Description

@mxork

What version of Racket are you using?

-> racket --version
Welcome to Racket v8.1 [cs].

What program did you run?

#lang racket

(module typed typed/racket/base
  (provide (struct-out A))
  (struct A ((x : Integer))))
(require 'typed)

(require (for-syntax syntax/parse racket/struct-info))
(define-syntax (inspect stx)
  (syntax-parse stx
    [(_ the-struct)
     (struct-field-info-list (syntax-local-value #'the-struct))
     #'(void)]))
(inspect A)

What should have happened?

Nothing.

If you got an error message, please include it here.

struct-field-info-list: contract violation
  expected: struct-field-info?
  given: #<procedure:struct-info+type+self-ctor-wrapper>
  context...:
   /usr/share/racket/collects/syntax/wrap-modbeg.rkt:46:4

discovered during: jeapostrophe/struct-define#6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions