From 8cc53d8936b98b0debb9cbd23efa64c813b45af2 Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Wed, 18 Jun 2008 18:22:16 -0400 Subject: [PATCH] Instantiation... seems to be broken. Adding unit tests to alert us to that fact. original commit: 8256f922f9c9cd2e24261b4309700c7e896c4454 --- .../typed-scheme/unit-tests/typecheck-tests.ss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.ss b/collects/tests/typed-scheme/unit-tests/typecheck-tests.ss index 6036a47d..a3714212 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.ss +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.ss @@ -563,6 +563,21 @@ (apply (plambda: (b ...) ([x : Number] . [y : Number ... b]) x) 1 w))] + ;; instantiating non-dotted terms + [tc-e (inst (plambda: (a) ([x : a]) x) Integer) + (-Integer . -> . -Integer)] + [tc-e (inst (plambda: (a) [x : a *] (apply + x)) Integer) + ((list) -Integer . ->* . -Integer)] + + ;; instantiating dotted terms + [tc-e (inst (plambda: (a ...) [xs : a ... a] 3) Integer Boolean Integer) + (-Integer B -Integer . -> . -Integer)] + [tc-e (inst (plambda: (a ...) [xs : (a ... a -> Integer) ... a] 3) Integer Boolean Integer) + ((-Integer B -Integer . -> . -Integer) + (-Integer B -Integer . -> . -Integer) + (-Integer B -Integer . -> . -Integer) + . -> . -Integer)] + ;; error tests [tc-err (#%variable-reference number?)] [tc-err (+ 3 #f)]