tomhrr / dale

Lisp-flavoured C
BSD 3-Clause "New" or "Revised" License
1.02k stars 48 forks source link

Function pointer type checking problem #142

Closed tomhrr closed 7 years ago

tomhrr commented 7 years ago
(import cstdio)

(def testfn (fn intern int ((f (p (fn int ((a int) (b int)))))
                            (a int)
                            (b int))
  (f a b)))

(def main (fn extern-c int (void)
  (printf "%d\n" (testfn (# + int int) 1 2))
  0))

> test.dt:9:17: error: overloaded function/macro not in scope: 'testfn' (parameters are (p (fn int ((const int) (const int))) int int, closest candidate expects (p (fn int (int int)) int int)