summaryrefslogtreecommitdiff
path: root/src/shared-validator.cc
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-12-13 11:07:44 -0800
committerGitHub <noreply@github.com>2021-12-13 11:07:44 -0800
commit8538a888d4298f98b4a4f17d0e3a9496863cee2b (patch)
tree3a7ea607aca45c4f1a01266827c656c2989aa195 /src/shared-validator.cc
parent134bafd382348c5bb2e6e5494b84300d0160c2f1 (diff)
downloadwabt-8538a888d4298f98b4a4f17d0e3a9496863cee2b.tar.gz
wabt-8538a888d4298f98b4a4f17d0e3a9496863cee2b.tar.bz2
wabt-8538a888d4298f98b4a4f17d0e3a9496863cee2b.zip
Fix type names for function references (#1787)
This requires `Type::GetName` to return to be dynamicllay created and return `std::string` rather then a `const char*` As this diff shows this type name is only used in textual output and error messages so should this change should not have a effect of binary parse time or the interpreter.
Diffstat (limited to 'src/shared-validator.cc')
-rw-r--r--src/shared-validator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared-validator.cc b/src/shared-validator.cc
index 9f54d3b7..0e77ffa0 100644
--- a/src/shared-validator.cc
+++ b/src/shared-validator.cc
@@ -178,7 +178,7 @@ Result SharedValidator::CheckType(const Location& loc,
const char* desc) {
if (Failed(TypeChecker::CheckType(actual, expected))) {
PrintError(loc, "type mismatch at %s. got %s, expected %s", desc,
- actual.GetName(), expected.GetName());
+ actual.GetName().c_str(), expected.GetName().c_str());
return Result::Error;
}
return Result::Ok;