-
-
Notifications
You must be signed in to change notification settings - Fork 104
Closed
Labels
Description
What version of Racket are you using?
8.0.0.3 on 0ff8d18be50b44c7595c909706068a241020e372
What program did you run?
(define (func [a : Fixnum]) : Fixnum
a)
(let loop ([idx (ann 10 Fixnum)])
(func idx))What should have happened?
The program should've type checked
If you got an error message, please include it here.
Type Checker: type mismatch
expected: Fixnum
given: Integer
in: idx
If we use a simple let-binding, the code would typecheck:
(let ([idx (ann 10 Fixnum)])
(func idx))This is one of the underlying issues that the following code (as a commented testcase in #953) doesn't type check
(for/list : (Listof Fixnum) ([i (in-fxvector (fxvector 1 2 3 4) 3 -1 -2)]) i)