aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/analysis.odin15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index b63c89b..e001294 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -2760,6 +2760,13 @@ resolve_binary_expression :: proc(ast_context: ^AstContext, binary: ^ast.Binary_
}
if !ok_a || !ok_b {
+ // we return the type that was correctly resolved, if one of them was
+ if ok_a {
+ return symbol_a, true
+ }
+ if ok_b {
+ return symbol_b, true
+ }
return {}, false
}
@@ -2778,6 +2785,13 @@ resolve_binary_expression :: proc(ast_context: ^AstContext, binary: ^ast.Binary_
}
if !ok_a || !ok_b {
+ // we return the type that was correctly resolved, if one of them was
+ if ok_a {
+ return symbol_a, true
+ }
+ if ok_b {
+ return symbol_b, true
+ }
return {}, false
}
@@ -2819,7 +2833,6 @@ resolve_binary_expression :: proc(ast_context: ^AstContext, binary: ^ast.Binary_
return symbol_b, true
}
-
//Otherwise just choose the first type, we do not handle error cases - that is done with the checker
return symbol_a, ok_a
}