fix comment, add test

svn: r18307

original commit: 1616e27b4b0a2a8cb1ad419933fdd38894c7a882
This commit is contained in:
Sam Tobin-Hochstadt 2010-02-23 21:36:53 +00:00
parent 349755c446
commit 43c22f41e5
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,29 @@
#lang scheme/load
(module before typed/scheme
(provide (all-defined-out))
(define-struct: Sigil ())
(: list->english ((Listof String) -> String))
(define (list->english strs) (error 'fail))
(define-type-alias (Set X) (HashTable X '()))
(: empty-set (All (T) (-> (Set T))))
(define (empty-set) (error 'fail))
(: set->list (All (T) ((Set T) -> (Listof T))))
(define (set->list set) (error 'fail))
)
(module after typed/scheme
(require 'before)
(: f ((Set Sigil) -> Any))
(define (f x1)
(let* ([x2 (set->list x1)])
(list->english x2)
(error 'NO! "Way!"))))

View File

@ -387,7 +387,7 @@
[((Box: e) (Box: e*))
(cset-meet (cg e e*) (cg e* e))]
[((Hashtable: s1 s2) (Hashtable: t1 t2))
;; the key is contravariant, the value is invariant
;; for mutable hash tables, both are invariant
(cset-meet* (list (cg t1 s1) (cg s1 t1) (cg t2 s2) (cg s2 t2)))]
[((Syntax: s1) (Syntax: s2))
(cg s1 s2)]