diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-18 16:56:56 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-18 16:56:56 +0800 |
commit | a3fb9f77f7397cb906f526c2bf401c2dd8a7b0ce (patch) | |
tree | e94a027dac2636a4cb6348ad4ac060c8957aebc7 | |
parent | 6b71fabd05aa1e3cbf5f18de988da18ee3d03c00 (diff) | |
download | mrust-a3fb9f77f7397cb906f526c2bf401c2dd8a7b0ce.tar.gz |
HIR Typecheck Expr - (minor) Fix use-after-free when method argument counts mismatch
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index 7501c1fd..df3cf594 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -2026,7 +2026,8 @@ namespace { assert( node.m_cache.m_arg_types.size() >= 1); if( node.m_args.size()+1 != node.m_cache.m_arg_types.size() - 1 ) { - ERROR(node.span(), E0000, "Incorrect number of arguments to " << fcn_path); + ERROR(node.span(), E0000, "Incorrect number of arguments to " << node.m_method_path + << " - exp " << node.m_cache.m_arg_types.size()-2 << " got " << node.m_args.size()); } DEBUG("- fcn_path=" << node.m_method_path); |