Fix golden tests to use the "target" Bazel configuration (#581)

In practice, this means that `executable_semantics` will be built and run using the configuration specified on the command line, rather than e.g. always using `-c opt`.

Also fix a bug exposed by this change.
This commit is contained in:
Geoff Romer
2021-06-16 16:33:19 -07:00
committed by GitHub
parent 07cee1b82a
commit 31f37f54fe
7 changed files with 103 additions and 58 deletions
@@ -149,8 +149,8 @@ auto TypeCheckExp(const Expression* e, TypeEnv types, Env values,
return TCResult(new_e, t, types);
}
case ExpressionKind::Index: {
auto res = TypeCheckExp(e->GetFieldAccess().aggregate, types, values,
nullptr, TCContext::ValueContext);
auto res = TypeCheckExp(e->GetIndex().aggregate, types, values, nullptr,
TCContext::ValueContext);
auto t = res.type;
switch (t->tag) {
case ValKind::TupleV: {