From b1fd426803080318222c88195548db24749f34db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Fri, 30 Oct 2015 13:51:39 +0100 Subject: [PATCH] Fixed copy-paste typo in previous commit (Added positive tests for member and assoc with third is-equal? argument) --- typed-racket-test/unit-tests/typecheck-tests.rkt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/typed-racket-test/unit-tests/typecheck-tests.rkt b/typed-racket-test/unit-tests/typecheck-tests.rkt index f182662c..acf3e798 100644 --- a/typed-racket-test/unit-tests/typecheck-tests.rkt +++ b/typed-racket-test/unit-tests/typecheck-tests.rkt @@ -2374,13 +2374,15 @@ ;; The result type shouldn't be widened to include that type though. [tc-e (member 3 '(a b c) - (lambda: ([s1 : (U Number Symbol String)] [s2 : String]) - (= (string-length (format "~a" s1)) (string-length s2)))) + (lambda: ([s1 : (U Number Symbol String)] [s2 : Symbol]) + (= (string-length (format "~a" s1)) + (string-length (symbol->string s2))))) (t:Un (-val #f) (-lst (one-of/c 'a 'b 'c)))] [tc-e (assoc 3 '((a . #(a)) (b . #(b)) (c . #(c))) (lambda: ([s1 : (U Number Symbol String)] [s2 : String]) - (= (string-length (format "~a" s1)) (string-length s2)))) + (= (string-length (format "~a" s1)) + (string-length (symbol->string s2))))) (t:Un (-val #f) (-pair (one-of/c 'a 'b 'c) (-vec -Symbol)))] ;; Reject `member` when needle not included in is-equal?'s argument type: [tc-err (member (ann 123 Number)