racket / racket/typed-racket

typed/rackunit: check-eq? broke its contract

Open
#54 14 comments 0 reactions 1 assignee View on GitHub

@capfredf is already working on this.

Since Mar 23, 2022.

Dominant language
Racket
Stars
575
Forks
106
Avg merge
2h 1m
Merged PRs (30d)
2

Description

check-eq? and check-equal? etc get blamed when I try to compare structs.

#lang typed/racket/base

(require typed/rackunit)

(define-struct foo ([bar : Any]))
(define foo1 (make-foo 42))

(check-eq? foo1 foo1)

The error:

check-eq?: broke its contract
  Attempted to use a higher-order value passed as `Any` in untyped code: #<foo>
  in: the 1st argument of
      (->* (Any Any) (any/c) any/c)
  contract from: (interface for check-eq?)
  blaming: (interface for check-eq?)
   (assuming the contract is correct)
  at: <pkgs>/typed-racket-more/typed/rackunit/main.rkt:18.2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.