projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b8e03b
)
fixed: incorrect error message when the type of an overload procedure is used
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Fri, 8 Dec 2023 17:18:37 +0000
(11:18 -0600)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Fri, 8 Dec 2023 17:19:15 +0000
(11:19 -0600)
compiler/src/astnodes.c
patch
|
blob
|
history
diff --git
a/compiler/src/astnodes.c
b/compiler/src/astnodes.c
index 7665d68f140fb684c855474f2114146cbbb7fee2..3fcba62d98cdb3e5d6ad3a092d2d1a0a857da585 100644
(file)
--- a/
compiler/src/astnodes.c
+++ b/
compiler/src/astnodes.c
@@
-1804,6
+1804,14
@@
const char* node_get_type_name(void* node) {
return "polymorphic procedure";
}
+ if (((AstNode *) node)->kind == Ast_Kind_Overloaded_Function) {
+ return "overloaded procedure";
+ }
+
+ if (((AstNode *) node)->kind == Ast_Kind_Alias) {
+ return node_get_type_name(((AstAlias *) node)->alias);
+ }
+
return type_get_name(((AstTyped *) node)->type);
}