Fix equality for tuples (#446)

* fix tuple equality, added test cases

* added a comment to an old function

* Update executable_semantics/interpreter/value.cpp

Co-authored-by: Geoff Romer <gromer@google.com>

* fix error in Geoffrey's edit

Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
Jeremy G. Siek
2021-04-21 17:12:10 -04:00
committed by GitHub
co-authored by Geoff Romer
parent 6639a915dc
commit c1d651fc15
10 changed files with 77 additions and 4 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ namespace Carbon {
struct Value;
using Address = unsigned int;
using VarValues = std::list<std::pair<std::string, const Value*>>;
using VarAddresses = std::vector<std::pair<std::string, Address>>;
auto FindInVarValues(const std::string& field, VarValues* inits)
-> const Value*;
@@ -81,7 +82,7 @@ struct Value {
} alt;
struct {
std::vector<std::pair<std::string, Address>>* elts;
VarAddresses* elts;
} tuple;
Address ptr;