Make TR use rest annotations over expected type.
Closes PR 10936. original commit: c67f5f753cadf2b5a4f595b4e4c14264382aea16
This commit is contained in:
parent
684601415e
commit
237aeb761c
|
@ -120,8 +120,8 @@
|
|||
[else
|
||||
(define base-rest-type
|
||||
(cond
|
||||
[rest-ty rest-ty]
|
||||
[(type-annotation rest) (get-type rest #:default Univ)]
|
||||
[rest-ty rest-ty]
|
||||
[else Univ]))
|
||||
(define extra-types
|
||||
(if (<= arg-len tys-len)
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#;
|
||||
(exn-pred 2)
|
||||
#lang typed/racket
|
||||
(define: my-rest : (All (elem) (elem elem * -> (Listof elem)))
|
||||
(lambda ( #{ arg : elem} . #{ tail : (Listof elem) })
|
||||
(rest tail)))
|
||||
(define: my-rest2 : (All (elem) (elem elem * -> (Listof elem)))
|
||||
(lambda ( #{ arg : elem} . #{ tail : elem })
|
||||
(rest tail)))
|
Loading…
Reference in New Issue
Block a user