checker: fix typos (#13929)

pull/13930/head
StunxFS 2022-04-04 03:07:53 -04:00 committed by GitHub
parent 91b40304b7
commit 725b472d37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 7 deletions

View File

@ -323,15 +323,13 @@ fn (mut c Checker) fn_decl(mut node ast.FnDecl) {
node.source_file = c.file
}
// FIXME: if the optimization will go after the checker, we can safely remove
// this util function
// check_same_type_ignoring_pointers util function to check if the Type are the same, included all the corner case
// check_same_type_ignoring_pointers util function to check if the Types are the same, including all
// corner cases.
// FIXME: if the optimization is done after the checker, we can safely remove this util function
fn (c Checker) check_same_type_ignoring_pointers(type_a ast.Type, type_b ast.Type) bool {
// FIXME: if is possible pass the ast.Node and check
// the propriety `is_auto_rec`
// FIXME: if possible pass the ast.Node and check the property `is_auto_rec`
if type_a != type_b {
// before failing we must be sure that
// the parser didn't optimize the function
// before failing we must be sure that the parser didn't optimize the function
clean_type_a := type_a.set_nr_muls(0)
clean_type_b := type_b.set_nr_muls(0)
return clean_type_a == clean_type_b