diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning1.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning1.rkt new file mode 100644 index 0000000000..0e37e7cfe0 --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning1.rkt @@ -0,0 +1,11 @@ +#; +(exn-pred #px"^((?!Integer).)+$") +#lang typed/racket + +;; Tests that function type pruning in errors is working. If the string +;; "Integer" shows up the error (which should be about Number), then +;; pruning is broken. +;; Because `exn-pred' only checks the first line of the error, only one +;; error expression per file (otherwise, the first line is a summary). + +(add1 'foo1) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning2.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning2.rkt new file mode 100644 index 0000000000..1fe5967fc1 --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning2.rkt @@ -0,0 +1,11 @@ +#; +(exn-pred #px"^((?!Integer).)+$") +#lang typed/racket + +;; Tests that function type pruning in errors is working. If the string +;; "Integer" shows up the error (which should be about Number), then +;; pruning is broken. +;; Because `exn-pred' only checks the first line of the error, only one +;; error expression per file (otherwise, the first line is a summary). + +(+ 'foo1 3) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning3.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning3.rkt new file mode 100644 index 0000000000..3222394075 --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/fail/error-pruning3.rkt @@ -0,0 +1,11 @@ +#; +(exn-pred #px"^((?!Integer).)+$") +#lang typed/racket + +;; Tests that function type pruning in errors is working. If the string +;; "Integer" shows up the error (which should be about Number), then +;; pruning is broken. +;; Because `exn-pred' only checks the first line of the error, only one +;; error expression per file (otherwise, the first line is a summary). + +(+ 'foo1 "a")