Correctly use a pattern variable in tc-app-apply.
Closes PR 14508. original commit: 7da7eacbda9110ab7e0bc1a7b0fa294dc0f60da2
This commit is contained in:
parent
3d8722075b
commit
b1b70f03fd
|
@ -22,11 +22,11 @@
|
|||
|
||||
(define-tc/app-syntax-class (tc/app-apply expected)
|
||||
#:literal-sets (apply-literals)
|
||||
(pattern ((~or apply k:apply) values e)
|
||||
(pattern ((~or apply k:apply) (~and f values) e)
|
||||
(match (single-value #'e)
|
||||
[(tc-result1: (ListDots: dty dbound))
|
||||
(ret null null null dty dbound)]
|
||||
[(tc-result1: (List: ts)) (ret ts)]
|
||||
[_ (tc/apply #'values #'(e))]))
|
||||
[_ (tc/apply #'f #'(e))]))
|
||||
(pattern ((~or apply k:apply) f . args)
|
||||
(tc/apply #'f #'args)))
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#;
|
||||
(exn-pred 1)
|
||||
#lang typed/racket
|
||||
|
||||
(: f (All (a ...) (-> a ... a (values a ... a))))
|
||||
(define (f . xs)
|
||||
(apply values 3))
|
Loading…
Reference in New Issue
Block a user