diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-07-02 12:20:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-02 12:20:10 -0500 |
commit | 02fc64067f5a0e0d1adb5d778562728cace0bdb5 (patch) | |
tree | f13d792812a1f20eae9d7bf69f4b97744df07a0d /src | |
parent | 5d5bd50528ee63683078fd16fe5df7c1b9c6f2fa (diff) |
Improve error message. (#2124)
Diffstat (limited to 'src')
-rw-r--r-- | src/parser/parser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index e8e2c2ea3..1f9c3fd2b 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -269,7 +269,8 @@ void Parser::defineVar(const std::string& name, const Expr& val, Debug("parser") << "defineVar( " << name << " := " << val << ")" << std::endl; if (!d_symtab->bind(name, val, levelZero, doOverload)) { std::stringstream ss; - ss << "Failed to bind " << name << " to symbol of type " << val.getType(); + ss << "Cannot bind " << name << " to symbol of type " << val.getType(); + ss << ", maybe the symbol has already been defined?"; parseError(ss.str()); } assert(isDeclared(name)); |