checker: fix typos (#13929)
parent
91b40304b7
commit
725b472d37
|
@ -323,15 +323,13 @@ fn (mut c Checker) fn_decl(mut node ast.FnDecl) {
|
||||||
node.source_file = c.file
|
node.source_file = c.file
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: if the optimization will go after the checker, we can safely remove
|
// check_same_type_ignoring_pointers util function to check if the Types are the same, including all
|
||||||
// this util function
|
// corner cases.
|
||||||
// check_same_type_ignoring_pointers util function to check if the Type are the same, included all the corner case
|
// 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 {
|
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
|
// FIXME: if possible pass the ast.Node and check the property `is_auto_rec`
|
||||||
// the propriety `is_auto_rec`
|
|
||||||
if type_a != type_b {
|
if type_a != type_b {
|
||||||
// before failing we must be sure that
|
// before failing we must be sure that the parser didn't optimize the function
|
||||||
// the parser didn't optimize the function
|
|
||||||
clean_type_a := type_a.set_nr_muls(0)
|
clean_type_a := type_a.set_nr_muls(0)
|
||||||
clean_type_b := type_b.set_nr_muls(0)
|
clean_type_b := type_b.set_nr_muls(0)
|
||||||
return clean_type_a == clean_type_b
|
return clean_type_a == clean_type_b
|
||||||
|
|
Loading…
Reference in New Issue