Fix bug 10763.

svn: r18418

original commit: 12257912e3a39efcd20bcd0ec3e778c630879577
This commit is contained in:
Sam Tobin-Hochstadt 2010-03-01 22:48:11 +00:00
parent 008ecc173f
commit ff6ad0c29d
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,9 @@
#lang typed/scheme
(define-struct: foo [(bar : Integer)])
(: f (foo -> Integer))
(define (f x)
(if (zero? (foo-bar x))
(error 'f "Nooooooo!")
(foo-bar x)))

View File

@ -46,7 +46,7 @@
;; struct ops
[((Struct: nm par flds proc poly pred cert acc-ids)
(TypeFilter: u (list rst ... (StructPE: (? (lambda (s) (subtype t s)) s) idx)) x))
(make-Struct nm par (replace-nth flds idx (lambda (e) (update e (make-TypeFilter u rst x)))) proc poly pred cert )]
(make-Struct nm par (replace-nth flds idx (lambda (e) (update e (make-TypeFilter u rst x)))) proc poly pred cert acc-ids)]
[((Struct: nm par flds proc poly pred cert acc-ids)
(NotTypeFilter: u (list rst ... (StructPE: (? (lambda (s) (subtype t s)) s) idx)) x))
(make-Struct nm par (replace-nth flds idx (lambda (e) (update e (make-NotTypeFilter u rst x)))) proc poly pred cert acc-ids)]