Changed order type annotations are processed. Closes PR 11560.

original commit: e3c4955ac9f7fb10f1281bc93bd08fe594bc728d
This commit is contained in:
Eric Dobson 2011-06-30 13:54:10 -04:00 committed by Vincent St-Amour
parent 0fa93ae065
commit 45314ee84b
3 changed files with 13 additions and 5 deletions

View File

@ -0,0 +1,2 @@
#lang typed/racket/base
(ann (ann 5 Real) Integer)

View File

@ -0,0 +1,2 @@
#lang typed/racket/base
(ann (ann 5 Integer) Real)

View File

@ -69,9 +69,10 @@
[(syntax-property stx type-ascrip-symbol)
=>
(lambda (prop)
(if (pair? prop)
(pt (car prop))
(pt prop)))]
(let loop ((prop prop))
(if (pair? prop)
(loop (cdr prop))
(pt prop))))]
[else #f]))
(define (remove-ascription stx)
@ -81,8 +82,11 @@
=>
(lambda (prop)
(if (pair? prop)
(cdr prop)
#f))]
(let loop ((prop (cdr prop)) (last (car prop)))
(if (pair? prop)
(cons last (loop (cdr prop) (car prop)))
last))
#f))]
[else #f])))
(define (log/ann stx ty)