dyoo / whalesong

Whalesong: Racket to JavaScript compiler
http://hashcollision.org/whalesong
250 stars 30 forks source link

variable lookup isn't checking undefined? #13

Closed dyoo closed 11 years ago

dyoo commented 13 years ago

(local [(define a (+ b 42)) (define b 17)]) (list a b))

isn't producing the error it should. It should say "local variable used before its definition".

dyoo commented 11 years ago

We are now matching behavior in Racket. I'm seeing the following error when evaluating the above code:

+: expected number as argument 1 but received #<undefined>

which is what we should be doing.