From c24afb09d9a61c448e32967d09768768783f034a Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Sun, 26 May 2013 18:12:38 -0700 Subject: [PATCH] Added #%expression to inst to order it correctly with ann. --- .../typed-racket-lib/typed-racket/base-env/prims.rkt | 4 ++-- .../tests/typed-racket/unit-tests/typecheck-tests.rkt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt index 36034c7b9b..8b21193470 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt @@ -388,9 +388,9 @@ This file defines two sorts of primitives. All of them are provided into any mod (syntax/loc stx (inst arg . tys))] [(_ arg tys ... ty ddd b:id) #:when (eq? (syntax-e #'ddd) '...) - (type-inst-property #'arg #'(tys ... (ty . b)))] + (type-inst-property (syntax/loc #'arg (#%expression arg)) #'(tys ... (ty . b)))] [(_ arg tys ...) - (type-inst-property #'arg #'(tys ...))])) + (type-inst-property (syntax/loc #'arg (#%expression arg)) #'(tys ...))])) (define-syntax (define: stx) (syntax-parse stx #:literals (:) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt index 76ade65769..1e4d539bf3 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -1695,6 +1695,9 @@ (opt-lambda: ((x : Symbol 'a)) x) #:ret (ret (t:-> -Symbol -Symbol) (-FS -top -bot)) #:expected (ret (t:-> -Symbol -Symbol) (-FS -top -bot))] + + [tc-e/t (inst (ann (lambda (a) a) (All (a) (a -> a))) Symbol) + (t:-> -Symbol -Symbol)] ) (test-suite "check-type tests"