Skip to content

Bindings re-exported in submodules are not protected by contracts #1064

@yjqww6

Description

@yjqww6

What version of Racket are you using?

8.0.0.12--2021-03-21(8bf8e3c/a) [cs]

What program did you run?

#lang racket

(module a typed/racket/base
  (define (f [a : Integer]) (add1 a))
  (module+ b
    (provide f)))

(require (submod 'a b))

(f #f)

What should have happened?

It should fail without calling add1.

If you got an error message, please include it here.

add1: contract violation
  expected: number?
  given: #f

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions