Fix equality handling on literals.

Repairs eb93a2b571 and closes #215.
This commit is contained in:
Sam Tobin-Hochstadt 2015-10-20 12:33:40 -04:00
parent b5dc5585be
commit 6aa635d740
3 changed files with 13 additions and 2 deletions

View File

@ -57,8 +57,8 @@
(tc-result1: (Value: (? ok? val2)) _ o2))
(ret -Boolean (-FS (-and (-filter (-val val2) o1)
(-filter (-val val1) o2))
(-and (-not-filter (-val val1) o1)
(-not-filter (-val val2) o2))))]
(-and (-not-filter (-val val2) o1)
(-not-filter (-val val1) o2))))]
[((tc-result1: t _ o) (tc-result1: (Value: (? ok? val))))
(ret -Boolean (-FS (-filter (-val val) o) (-not-filter (-val val) o)))]
[((tc-result1: (Value: (? ok? val))) (tc-result1: t _ o))

View File

@ -0,0 +1,7 @@
#lang typed/racket
(ann (let ((x 'b))
(if (equal? x 'a)
42
"foo")) Number)

View File

@ -0,0 +1,4 @@
#;
(exn-pred "match:")
#lang typed/racket
(ann (match '(b) [(list 'a) 42]) Number)