Skip to content

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

@yjqww6

Description

@yjqww6
Contributor

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

Activity

samth

samth commented on Mar 22, 2021

@samth
SponsorMember

This is probably failing to figure out that f is defined "locally" and thus needs a contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @samth@yjqww6@jackfirth

        Issue actions

          Bindings re-exported in submodules are not protected by contracts · Issue #1064 · racket/typed-racket