Skip to content

Commit 1def7ab

Browse files
committed
ignore error type
1 parent dbae57a commit 1def7ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

godel-script/godel-frontend/src/semantic.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -2359,7 +2359,7 @@ bool semantic::check_single_argument(expr* argument, const symbol& param) {
23592359
}
23602360

23612361
// check type match
2362-
if (param!=expr_infer.type) {
2362+
if (param != expr_infer.type && !expr_infer.type.is_err()) {
23632363
err.err(argument->get_location(),
23642364
"expected \"" + param.full_path_name() +
23652365
"\" but get \"" + expr_infer.type.full_path_name() + "\"."
@@ -2864,7 +2864,8 @@ void semantic::query_check(query_decl* node) {
28642864
.is_set = false
28652865
};
28662866

2867-
if (initial_infer.type!=from_variable_type) {
2867+
if (initial_infer.type != from_variable_type &&
2868+
!initial_infer.type.is_err()) {
28682869
err.err(i->get_init_value()->get_location(),
28692870
"expected \"" + from_variable_type.full_path_name() +
28702871
"\" but get \"" + initial_infer.type.full_path_name() +

0 commit comments

Comments
 (0)