What version of Racket are you using?
Welcome to DrRacket, version 7.9.0.5 [3m].
What program did you run?
#lang typed/racket/base
(: test1 (->* [Integer]
[Integer
Integer]
Integer))
(define (test1 a [b 0])
(cond
[(and a b) 1]
[else 2]))
(define (run1)
(test1 0 1 2))
What should have happened?
this program type-checks, where I would expect a failure to type-check.
on calling (run1) you get:
test1: arity mismatch;
the expected number of arguments does not match the given number
given: 3
arguments...:
0
1
2
Activity
capfredf commentedon Nov 17, 2020
Seems like
test1should not type check in the first place.