typed-racket/typed-racket-test/fail/sandboxed-unsafe-ops.rkt
Alex Knauth a1f8908a29 call compute-constraints instead of sc->constraints in get-max-contract-kind (#382)
* call compute-constraints instead of sc->constraints in get-max-contract-kind

* test cast on an intersection type involving Rec

* remove memory limit on sandboxed-unsafe-ops test
2016-07-07 12:16:15 -04:00

17 lines
420 B
Racket

#;
(exn-pred #rx"access disallowed by")
#lang racket/base
;; This test checks that TR's unsafe libraries are not accessible
;; from a sandboxed context
(require racket/sandbox)
;; this doesn't need a memory limit
(parameterize ([sandbox-memory-limit #f])
(define eval (make-evaluator 'typed/racket))
(eval '(require typed/racket/unsafe))
;; should fail
(eval '(unsafe-require/typed racket/base [values 3])))