aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2021-03-30 14:19:38 +0200
committerGitHub <noreply@github.com>2021-03-30 14:19:38 +0200
commit9cca606864a6ce95355f3bf2fdb2e2854a572c68 (patch)
treedf20b7d8f794dcbe5276fa4e1a5f1b5a18ad2ece /src
parent1c5599f44562a6ee1cd6abe03fd764e8efcd4f11 (diff)
parent301199773aedb5a8877735c4aa48272f1427fdf5 (diff)
Merge pull request #22 from dresswithpockets/master
add case for `Type_Cast` node in `clone_node`
Diffstat (limited to 'src')
-rw-r--r--src/index/clone.odin4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/index/clone.odin b/src/index/clone.odin
index a2b9d38..f9a7604 100644
--- a/src/index/clone.odin
+++ b/src/index/clone.odin
@@ -214,6 +214,10 @@ clone_node :: proc(node: ^ast.Node, allocator: mem.Allocator, unique_strings: ^m
case Helper_Type:
r := cast(^Helper_Type)res;
r.type = clone_type(r.type, allocator, unique_strings);
+ case Type_Cast:
+ r := cast(^Type_Cast)res;
+ r.type = clone_type(r.type, allocator, unique_strings);
+ r.expr = clone_type(r.expr, allocator, unique_strings);
case:
panic(fmt.aprintf("Clone type Unhandled node kind: %T", node.derived));
}