Fix check-unreachable-code? mode in TR
This commit is contained in:
parent
6695ccc8cd
commit
07c944f337
|
@ -25,7 +25,7 @@
|
|||
;; otherwise, this code is unreachable
|
||||
;; and the resulting type should be the empty type
|
||||
[(check-unreachable-code?)
|
||||
(tc-expr/check expr Univ)
|
||||
(tc-expr expr)
|
||||
(ret (Un))]
|
||||
[else (ret (Un))]))
|
||||
(match (single-value tst)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#;
|
||||
(exn-pred #rx"expected: Symbol.*given: String")
|
||||
#lang racket/load
|
||||
|
||||
;; This test makes sure that the check-unreachable-code mode
|
||||
;; actually works.
|
||||
|
||||
(require (for-syntax typed-racket/utils/tc-utils))
|
||||
|
||||
(begin-for-syntax
|
||||
(check-unreachable-code? #t))
|
||||
|
||||
(require typed/racket)
|
||||
|
||||
(if #t
|
||||
"foo"
|
||||
(symbol->string "foo"))
|
Loading…
Reference in New Issue
Block a user