What version of Racket are you using?
7.9.0.10 on c71e6289af3f1c6e4498e3503519d95f889cdcb6
What program did you run?
(struct root ([p : Integer] [q : Integer])
#:property prop:custom-write
(λ ([me : Integer] [port : Output-Port] mode) : Void
(fprintf port "[[~a ~a]]" (root-p me) (root-q me))))
What should have happened?
A type error
If you got an error message, please include it here.
If the parameter mode in the lambda is correctly annotated with (U Boolean 1 0), then the typechecker reports a type error expectedly