Fix compilation errors for the newly introduce test & add type inference.

Tests are basically functions for which the return type should unify with bool. In principle, the type checker could also check that a test function has no arguments but, a test function with arguments wouldn't parse in the first place; feels a bit hacky but it works when considering the pipeline as a whole.

  Note that the code generation is still to be done.
This commit is contained in:
KtorZ
2022-12-08 14:45:26 +01:00
committed by rvcas
parent ea48747825
commit bc785673b2
5 changed files with 44 additions and 3 deletions

View File

@@ -336,6 +336,9 @@ impl Project {
func,
);
}
Definition::Test(_) => {
todo!()
}
Definition::TypeAlias(ta) => {
type_aliases.insert((module.name.clone(), ta.alias.clone()), ta);
}