mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-26 18:31:18 +00: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:
1 parent
9feff92f22
commit
9f534ae004
29 files changed
+1386
-455
No files matched your search
@@ -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