~jojo/Carth

ref: 55fb4f948f1f3797078b584dc60b4f7dd68b37ed Carth/test/tests/good/cast-poly.carth -rw-r--r-- 180 bytes
55fb4f94JoJo Check `cast` in Infer instead of Gen 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
;; 420

(import std)

(define (to-int a) (: (cast a) Int))

(define main
  (display (show-int (+ (to-int (: 400.20     F64))
                        (to-int (: (cast 20) Nat))))))