summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hir_typeck/expr_check.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_check.cpp b/src/hir_typeck/expr_check.cpp
index 4f4235cd..4c372c40 100644
--- a/src/hir_typeck/expr_check.cpp
+++ b/src/hir_typeck/expr_check.cpp
@@ -672,10 +672,14 @@ namespace {
DEBUG("= " << cache.m_arg_types.back());
// Check types
- for(unsigned int i = 0; i < node.m_args.size(); i ++) {
+ for(unsigned int i = 0; i < fcn.m_args.size(); i ++) {
DEBUG("CHECK ARG " << i << " " << node.m_cache.m_arg_types[i] << " == " << node.m_args[i]->m_res_type);
check_types_equal(node.span(), node.m_cache.m_arg_types[i], node.m_args[i]->m_res_type);
}
+ for(unsigned int i = fcn.m_args.size(); i < node.m_args.size(); i ++) {
+ DEBUG("CHECK ARG " << i << " * == " << node.m_args[i]->m_res_type);
+ // TODO: Check that the types here are valid.
+ }
DEBUG("CHECK RV " << node.m_res_type << " == " << node.m_cache.m_arg_types.back());
check_types_equal(node.span(), node.m_res_type, node.m_cache.m_arg_types.back());