Make resolve and the typechecker check for a main fn of the

correct type

This means if a non-library program leaves out the main program,
the error gets caught earlier than link.

Closes #626.
This commit is contained in:
Tim Chevalier 2011-07-13 17:26:06 -07:00
parent 196753e4c3
commit f26ca025de
9 changed files with 89 additions and 10 deletions

View file

@ -1,4 +1,4 @@
import std::str;
import std::map;
import std::map::hashmap;
import std::uint;
@ -187,6 +187,9 @@ fn call_kind_str(call_kind c) -> str {
}
}
fn is_main_name(&str[] path) -> bool {
str::eq(option::get(std::ivec::last(path)), "main")
}
//
// Local Variables:
// mode: rust