racket / typed-racket

Typed Racket
Other
521 stars 104 forks source link

ctype? is broken because a high-order value passed as `Any` #393

Open wargrey opened 8 years ago

wargrey commented 8 years ago

What version of Racket are you using?

6.6.0.1 (6.5 is okay)

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

typed-racket/utils/require-contract.rkt:59:16: ctype?: broke its own contract Attempted to use a higher-order value passed as Any in untyped code: # in: the 1st argument of a part of the or/c of (or/c struct-predicate-procedure?/c (-> Any boolean?)) contract from: (interface for ctype?) blaming: (interface for ctype?) (assuming the contract is correct)

AlexKnauth commented 8 years ago

In the very very latest version of typed racket, this error becomes a warning instead. These two commits did that: https://github.com/racket/typed-racket/commit/50aab9806ff549ddc5f59f00d16ce336bc20eec6 https://github.com/racket/typed-racket/commit/3d80322d272daeeafb3a3211f8a25befad79bc15

wargrey commented 8 years ago

Okay, it works. Although, those warnings are annoying.

samth commented 8 years ago

Yes, they are. I have a patch in progress to allow TR to know that cpointer? is safe, but in general this isn't an easy problem to solve.

wargrey commented 8 years ago

All right, thank you all.