Skip to content

Commit 273d389

Browse files
Fix 1 occurrence of and-match-to-match
This `and` expression can be turned into a clause of the inner `match` expression, reducing nesting.
1 parent 97c1968 commit 273d389

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

typed-racket-lib/typed-racket/typecheck/possible-domains.rkt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555

5656
;; currently does not take advantage of multi-valued or arbitrary-valued expected types,
5757
(define expected-ty
58-
(and expected
59-
(match expected
60-
[(tc-result1: t) t]
61-
[(tc-any-results: (or #f (TrueProp:))) #t] ; anything is a subtype of expected
62-
[_ #f]))) ; don't know what it is, don't do any pruning
58+
(match expected
59+
[#f #f]
60+
[(tc-result1: t) t]
61+
[(tc-any-results: (or #f (TrueProp:))) #t] ; anything is a subtype of expected
62+
[_ #f])) ; don't know what it is, don't do any pruning
6363
(define (returns-subtype-of-expected? fun-ty)
6464
(or (not expected) ; no expected type, anything is fine
6565
(eq? expected-ty #t) ; expected is tc-anyresults, anything is fine

0 commit comments

Comments
 (0)