Am I missing something, or is this a bug?
<div>The following works as expected:</div><div><br></div><div><div>Welcome to DrRacket, version 5.1.2.3--2011-07-13(41b66d3/a) [3m].</div><div>Language: racket; memory limit: 128 MB.</div><div>> (module yup racket</div>
<div> (struct a (x y) #:transparent)</div><div> (struct b a (z) #:transparent) </div><div> (provide (struct-out a) (struct-out b)))</div><div>> (require 'yup)</div><div>> (struct-copy b (b 1 2 3) [z 6] [x #:parent a 2])</div>
<div><br></div><div>(b 2 2 6)</div></div><div><br></div><div><br></div><div>However, with provide/contract instead gives an error:</div><div><br></div><div><div>> (module yup racket</div><div> (struct a (x y) #:transparent)</div>
<div> (struct b a (z) #:transparent) </div><div> (provide/contract </div><div> [struct a ((x number?) (y number?))] </div><div> [struct (b a) ((x number?) (y number?) (z number?))]))</div><div>> (require 'yup)</div>
<div>> (struct-copy b (b 1 2 3) [z 6] [x #:parent a 2])</div><div><br></div><div>. struct-copy: identifier not bound to a parent struct in: a</div></div><div> (with "a" highlighted in the [x #:parent a 2] expression)</div>
<div><br></div><div><br></div><div><br></div><div>--- nadeem</div><div><br></div>