mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 12:50:12 +01:00
Parameterized impl declarations (#1189)
* parameterized impls, first step * bug fixes, comments, etc. * added another test case, fix a bug in impl lookup * simplify tests, removing tuple stuff * don't create impl bindings for -bound implicit parameters * remove a redundant 'private' * CamelCase * add missing backtick * add a comment
This commit is contained in:
@@ -164,6 +164,11 @@ void Expression::Print(llvm::raw_ostream& out) const {
|
||||
<< if_expr.then_expression() << " else " << if_expr.else_expression();
|
||||
break;
|
||||
}
|
||||
case ExpressionKind::InstantiateImpl: {
|
||||
const auto& inst_impl = cast<InstantiateImpl>(*this);
|
||||
out << "instantiate " << *inst_impl.generic_impl();
|
||||
break;
|
||||
}
|
||||
case ExpressionKind::UnimplementedExpression: {
|
||||
const auto& unimplemented = cast<UnimplementedExpression>(*this);
|
||||
out << "UnimplementedExpression<" << unimplemented.label() << ">(";
|
||||
@@ -237,6 +242,7 @@ void Expression::PrintID(llvm::raw_ostream& out) const {
|
||||
case ExpressionKind::UnimplementedExpression:
|
||||
case ExpressionKind::FunctionTypeLiteral:
|
||||
case ExpressionKind::ArrayTypeLiteral:
|
||||
case ExpressionKind::InstantiateImpl:
|
||||
out << "...";
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user