parent
53d077c27d
commit
ed2cf43a19
17
typed-racket-test/succeed/issue-33.rkt
Normal file
17
typed-racket-test/succeed/issue-33.rkt
Normal file
|
@ -0,0 +1,17 @@
|
|||
#lang typed/racket/base
|
||||
|
||||
;; regression test for issue #33
|
||||
;; https://github.com/racket/typed-racket/issues/33
|
||||
|
||||
;; In 2015, gave the error message:
|
||||
;; Type Checker: type mismatch
|
||||
;; expected: (U (List Symbol Any) (List String Symbol))
|
||||
;; given: (List String Any)
|
||||
;; in: (list "foo" (quote bold))
|
||||
|
||||
(: x (U (List Symbol Any)
|
||||
(List String Symbol)))
|
||||
(define x (list "foo" 'bold))
|
||||
|
||||
(when (and (string? (car x)) (symbol? (cadr x)))
|
||||
(ann x (List String Symbol)))
|
Loading…
Reference in New Issue
Block a user