mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 07:25:00 +01:00
improve abstraction for AssocList, fix bug in optional else (#315)
* improve abstraction for AssocList, fix bug in optional else * add flag for tracing output, clean up code for output * turned off tracing by default, updated goldens, removed two examples that use pointers, shouldn't have been there yet
This commit is contained in:
@@ -314,6 +314,11 @@ void PrintValue(Value* val, std::ostream& out) {
|
||||
}
|
||||
}
|
||||
|
||||
auto operator<<(std::ostream& out, const Value& v) -> std::ostream& {
|
||||
PrintValue((Value*)&v, out);
|
||||
return out;
|
||||
}
|
||||
|
||||
auto TypeEqual(Value* t1, Value* t2) -> bool {
|
||||
if (t1->tag != t2->tag) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user