You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Racket are you using?
Racket 8.12 [cs]
What program did you run?
#lang racket/base
(struct thing-1 (a [b #:auto])
#:auto-value 'b
#:property prop:object-name (struct-field-index a))
(struct thing-2 (a [b #:auto])
#:auto-value 'b
#:property prop:object-name (struct-field-index b))
(object-name (thing-1 'a)) ; => 'a
(object-name (thing-2 'a)) ; => 'b (except it isn't)
What should have happened?
One would except to get back the values 'a and 'b.
If you got an error message, please include it here.
We get 'a as expected but instead of 'b we get the error:
guard-for-prop:object-name: field index >= initialized-field count for structure type
field index: 1
initialized-field count: 1
Please include any other relevant details
Looking at the racket source, It's not clear why this error happens but it does seem to be intentional. If that is the case then the correct course of action would probably be to alter the documentation of object-name to specify what kinds of fields can and cannot be used as names.
The text was updated successfully, but these errors were encountered:
What version of Racket are you using?
Racket 8.12 [cs]
What program did you run?
What should have happened?
One would except to get back the values
'a
and'b
.If you got an error message, please include it here.
We get
'a
as expected but instead of'b
we get the error:Please include any other relevant details
Looking at the racket source, It's not clear why this error happens but it does seem to be intentional. If that is the case then the correct course of action would probably be to alter the documentation of
object-name
to specify what kinds of fields can and cannot be used as names.The text was updated successfully, but these errors were encountered: