-
-
Notifications
You must be signed in to change notification settings - Fork 104
Closed
Labels
Description
What version of Racket are you using?
7.7.0.9 (also tested with 7.7.0.7)
What program did you run?
#lang typed/racket/base
(define (root-split [alg : Integer]
[make-mid : (-> Integer Integer Integer)]
#:checkΔ [Δfct : (-> Integer)#;(λ () 1)]
) : Integer
(make-mid 0 0)
1)
(define (test)
(root-split 1
(λ ([lst : (Listof (List Integer Integer))]): Integer 1)
#:checkΔ (λ () 1)))
What should have happened?
Type Checker: type mismatch
extra
Removing argument alg (definition and call) does trigger the typechecker to fail,
Removing the kw of the third argument also triggers the error
adding or removing the optional part of this kw-argument or writing the type with:
(: root-split (->* (Integer (-> Integer Integer Integer) #:check (-> Integer))() Integer))
or
(: root-split (->* (Integer (-> Integer Integer Integer))(#:check (-> Integer)) Integer))
have no effect (ie it type checks)
the call to root-split doesn't need to be in (test), but if not then running the file will immediately trigger a runtime error
juszczakn