Re: [racket] Typed classes: how to send to a value with union type

2014-08-19 Thread Asumu Takikawa
On 2014-08-19 14:48:22 -0400, Alexander D. Knauth wrote: > This works fine for me in version 6.1.0.5: > #lang typed/racket > (require typed/racket/snip) > (define snip (new snip%)) > (define admin (send snip get-admin)) > (define editor (and admin (send admin get-editor))) > (when editor > (send

Re: [racket] Typed classes: how to send to a value with union type

2014-08-19 Thread Alexander D. Knauth
This works fine for me in version 6.1.0.5: #lang typed/racket (require typed/racket/snip) (define snip (new snip%)) (define admin (send snip get-admin)) (define editor (and admin (send admin get-editor))) (when editor (send editor set-caret-owner #f)) On Aug 19, 2014, at 1:32 PM, Neil Toronto w

[racket] Typed classes: how to send to a value with union type

2014-08-19 Thread Neil Toronto
I'm making a snip in Typed Racket. I have essentially this: (define admin (send this get-admin)) (define editor (and admin (send admin get-editor))) (when editor (send editor set-caret-owner #f)) I get this error: Type Checker: send: type mismatch expected: an object given: