aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tuplr.hpp')
-rw-r--r--tuplr.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tuplr.hpp b/tuplr.hpp
index efcba1f..2f66d9f 100644
--- a/tuplr.hpp
+++ b/tuplr.hpp
@@ -50,7 +50,7 @@ struct Cursor {
/// Compiler error
struct Error {
- Error(const string& m, Cursor c=Cursor()) : msg(m), loc(c) {}
+ Error(const string& m, Cursor c) : msg(m), loc(c) {}
const string what() const { return (loc ? loc.str() + ": " : "") + "error: " + msg; }
string msg;
Cursor loc;
@@ -220,7 +220,7 @@ struct ATuple : public AST, public vector<AST*> {
return false;
}
void constrain(TEnv& tenv, Constraints& c) const;
- CValue compile(CEnv& cenv) { throw Error("tuple compiled"); }
+ CValue compile(CEnv& cenv) { throw Error("tuple compiled", loc); }
};
/// Type Expression, e.g. "Int", "(Fn (Int Int) Float)"