aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2021-05-09 22:57:21 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2021-05-09 22:57:21 +0200
commit9fd0db11bbf66a12f051ea3e95444b3291c760d5 (patch)
tree938611af52f0964e9f2bf7f03575cff0465a5cb7 /src
parent9c2090e0395d68bb9a89cfd3f69f863375a27f54 (diff)
add all functions in proc group if call len(args) == 0
Diffstat (limited to 'src')
-rw-r--r--src/common/ast.odin1
-rw-r--r--src/server/analysis.odin2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/common/ast.odin b/src/common/ast.odin
index 839c7f5..d110441 100644
--- a/src/common/ast.odin
+++ b/src/common/ast.odin
@@ -673,6 +673,7 @@ build_string_node :: proc(node: ^ast.Node, builder: ^strings.Builder) {
case Basic_Directive:
strings.write_string(builder, n.name);
case Ellipsis:
+ strings.write_string(builder, "..");
build_string(n.expr, builder);
case Proc_Lit:
build_string(n.type, builder);
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index c90e2fe..af58546 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -645,7 +645,7 @@ resolve_function_overload :: proc(ast_context: ^AstContext, group: ast.Proc_Grou
next_fn: if f, ok := resolve_type_expression(ast_context, arg_expr); ok {
- if ast_context.call == nil {
+ if ast_context.call == nil || len(ast_context.call.args) == 0 {
append(&candidates, f);
break next_fn;
}