mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Implement support for rewrite constraints (#2276)
Implements basic support for rewrite constraints as proposed in #2173. Support for associated constants and complex constraints in general is also made more robust: argument deduction now properly computes and substitutes witnesses, and interface declarations track a more correct description of the constraint that they introduce than the one we previously built.
This commit is contained in:
@@ -360,6 +360,11 @@ void WhereClause::Print(llvm::raw_ostream& out) const {
|
||||
out << clause.lhs() << " == " << clause.rhs();
|
||||
break;
|
||||
}
|
||||
case WhereClauseKind::RewriteWhereClause: {
|
||||
auto& clause = cast<RewriteWhereClause>(*this);
|
||||
out << "." << clause.member_name() << " = " << clause.replacement();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user