Parameters can overlap with procedure types.

Closes PR 11993.
This commit is contained in:
Sam Tobin-Hochstadt 2012-02-12 14:30:01 -05:00
parent fd7235f94a
commit d0fbe825e6
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,7 @@
#lang typed/racket
(require/typed racket
(current-directory (-> Path)))
(unless (equal? (parameter? current-directory)
(if (parameter? current-directory) #t #f))
(error 'unsound!))

View File

@ -366,7 +366,7 @@
;; in : Type ;; in : Type
;; out : Type ;; out : Type
(def-type Param ([in Type/c] [out Type/c]) (def-type Param ([in Type/c] [out Type/c])
[#:key 'parameter] [#:key 'procedure]
[#:frees (λ (f) (combine-frees (list (f out) (flip-variances (f in)))))]) [#:frees (λ (f) (combine-frees (list (f out) (flip-variances (f in)))))])
;; key : Type ;; key : Type