samrushing/irken-compiler

silently ignored invalid type-annotation

jeske opened this issue · 1 comments

jeske commented

This program has an incorrect type-annotation for the function work_on_file. However, irken will silently compile it just fine. Adding the -types option curiously causes it to catch the type error.

(include "lib/basis.scm")

(typealias file_descriptor int)

(define (work_on_file f) : (file_descriptor)  ;; should be (file_descriptor -> int
   0 )

(work_on_file 1)

I think this is a dup of #24.