diff options
author | Liz Kammer <eakammer@google.com> | 2020-09-14 12:42:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 12:42:25 -0500 |
commit | 31319390398857b4019b06e53d65ab41f04d8278 (patch) | |
tree | 6220d25d42793130c0811616ad51ca66cc455e4f /src/dep.cc | |
parent | 631e467325a191a92d2e9454dc9b0fe6e3f21f80 (diff) | |
download | kati-31319390398857b4019b06e53d65ab41f04d8278.tar.gz |
Error when a recursive variable references itself (#205)
* Error when a recursive variable references itself
Identify when a recursive variable references itself and print the
appropriate error message.
Fixes: https://github.com/google/kati/issues/204
* trigger GitHub actions
* trigger GitHub actions
Diffstat (limited to 'src/dep.cc')
-rw-r--r-- | src/dep.cc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -692,7 +692,8 @@ class DepBuilder { if (!s->empty()) *s += ' '; new_var->Eval(ev_, s.get()); - new_var = new SimpleVar(*s, old_var->Origin(), frame.Current()); + new_var = + new SimpleVar(*s, old_var->Origin(), frame.Current(), n->loc); } } else if (var->op() == AssignOp::QUESTION_EQ) { Var* old_var = ev_->LookupVar(name); |