From e3fcab3105dd0aff71d9a2398337c52b2eb5bd13 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Tue, 21 Jan 2014 19:27:46 -0500 Subject: [PATCH] Update TR mutation error message to new format original commit: 1b458c97d7cc478950b8ab75d41cf113f64d9015 --- .../typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt index a1238399..77a27ae4 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt @@ -209,7 +209,7 @@ (match-let* ([(tc-result1: id-t) (single-value #'id)] [(tc-result1: val-t) (single-value #'val)]) (unless (subtype val-t id-t) - (tc-error/expr "Mutation only allowed with compatible types:\n~a is not a subtype of ~a" val-t id-t)) + (type-mismatch id-t val-t "mutation only allowed with compatible types")) (ret -Void))] ;; top-level variable reference - occurs at top level [(#%top . id) (tc-id #'id)] @@ -375,7 +375,7 @@ (match-let* ([(tc-result1: id-t) (tc-expr #'id)] [(tc-result1: val-t) (tc-expr #'val)]) (unless (subtype val-t id-t) - (tc-error/expr "Mutation only allowed with compatible types:\n~a is not a subtype of ~a" val-t id-t)) + (type-mismatch id-t val-t "mutation only allowed with compatible types")) (ret -Void))] ;; top-level variable reference - occurs at top level [(#%top . id) (tc-id #'id)]