opendylan
opendylan copied to clipboard
Bad warning for missing semicolon after "let" binding.
Given this code,
define function main (name :: <string>, arguments :: <vector>)
let name = "foo"
format-out("Hello, world!\n");
end;
I get this error:
/home/cgay/dylan/my-app/my-app.dylan:5: Serious warning - Invalid syntax in let macro call.
----
let name = "foo"
----
In this toy example it's fairly easy to see that there's a missing semicolon. In real code, with longer lines and more things to worry about, it can be quite confusing because the error message leads one to believe that there's something wrong with the let. Conceptually the semicolon isn't part of the let; it's just a separator. The error message should say, if possible, something like "missing semicolon after let binding."