aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-11-30 12:00:10 +1100
committerGitHub <noreply@github.com>2025-11-30 12:00:10 +1100
commitb7aacba5b604f04cb33604632cf16af359208682 (patch)
treee94ad4108744e43067b0f07a069f060c77250919 /src
parenta5f43fd98dc7b853cf6c198a51d424886b66ea42 (diff)
parent5e177c085afdea823cf635c22894f89855434d28 (diff)
Merge pull request #1193 from BradLewis/fix/union-pointer
Correctly resolve type assertions with unary exprs
Diffstat (limited to 'src')
-rw-r--r--src/server/locals.odin6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/locals.odin b/src/server/locals.odin
index a88a6d7..edebd85 100644
--- a/src/server/locals.odin
+++ b/src/server/locals.odin
@@ -285,6 +285,12 @@ get_generic_assignment :: proc(
append(results, b)
}
+ case ^Unary_Expr:
+ append(results, value)
+ if n, ok := v.expr.derived.(^Type_Assertion); ok {
+ b := make_bool_ast(ast_context, n.type.pos, n.type.end)
+ append(results, b)
+ }
case ^Ternary_If_Expr:
get_generic_assignment(file, v.x, ast_context, results, calls, flags, is_mutable)
case ^Ternary_When_Expr: