Make standalone annotation use #f instead of #'#f.
This commit is contained in:
parent
31ccd1ba7c
commit
4ac26e919a
|
@ -152,7 +152,7 @@
|
|||
#:with ty #'t))
|
||||
(define-splicing-syntax-class optional-standalone-annotation
|
||||
(pattern (~optional a:standalone-annotation)
|
||||
#:with ty (if (attribute a) #'a.ty #f)))
|
||||
#:attr ty (if (attribute a) #'a.ty #f)))
|
||||
|
||||
(define-syntax-class type-variables
|
||||
#:attributes ((vars 1))
|
||||
|
|
|
@ -888,7 +888,7 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
#,(loop #'(rest ...))))])))]))
|
||||
|
||||
(define-for-syntax (maybe-annotate-body body ty)
|
||||
(if (syntax-e ty)
|
||||
(if ty
|
||||
(type-ascription-property body ty)
|
||||
body))
|
||||
|
||||
|
@ -905,13 +905,11 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
clause:for-clauses
|
||||
c ...) ; c is not always an expression, can be a break-clause
|
||||
(maybe-annotate-body
|
||||
(quasisyntax/loc stx
|
||||
(#,name
|
||||
(clause.expand ... ...)
|
||||
#,@(maybe-annotate-body
|
||||
#'(c ...)
|
||||
#'a.ty)))
|
||||
#'a.ty)])))
|
||||
(quasisyntax/loc stx
|
||||
(#,name
|
||||
(clause.expand ... ...)
|
||||
c ...))
|
||||
(attribute a.ty))])))
|
||||
(define-syntax (define-for-variants stx)
|
||||
(syntax-parse stx
|
||||
[(_ (name untyped-name) ...)
|
||||
|
@ -1004,7 +1002,7 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
(quasisyntax/loc stx
|
||||
(#,name (clause.expand ... ...)
|
||||
c ...))
|
||||
#'a.ty)])))
|
||||
(attribute a.ty))])))
|
||||
(define-syntax (define-for*-variants stx)
|
||||
(syntax-parse stx
|
||||
[(_ (name no-colon-name) ...)
|
||||
|
@ -1069,7 +1067,7 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
clause:for-clauses
|
||||
c ...) ; c is not always an expression, can be a break-clause
|
||||
(cond
|
||||
[(syntax-e #'a.ty)
|
||||
[(attribute a.ty)
|
||||
;; ty has to include exact 0, exact 1, null (sum/product/list respectively),
|
||||
;; the initial value of the accumulator
|
||||
;; (to be consistent with Racket semantics).
|
||||
|
|
|
@ -2906,6 +2906,10 @@
|
|||
-Symbol
|
||||
#:expected (ret -Symbol)]
|
||||
|
||||
[tc-e
|
||||
(ann (for/list ([z #"foobar"]) (add1 z)) (Listof Integer))
|
||||
(-lst -Int)]
|
||||
|
||||
)
|
||||
(test-suite
|
||||
"tc-literal tests"
|
||||
|
|
Loading…
Reference in New Issue
Block a user