samrushing / irken-compiler

Irken is a statically typed variant of Scheme. Or a lisp-like variant of ML.

Home Page:http://nightmare.com/rushing/irken.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

redefining a function does not produce an error, but does not work

jeske opened this issue · comments

(include "lib/basis.scm")
(define (a x) (+ x 1))
(define (a x) (+ x 10))
(a 10)  ;; today yields 11

I expect this either to yield 20, or to be a compile error.

checked with your repro:

$ self/compile tests/t_jeske1.scm
read...
transform...

duplicate name:
***
Runtime Error, halting: a

The exception that is raised carries both symbols. If/when symbols carry file/pos info, the error message will be better.