mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Support user-defined implicit conversions via ImplicitAs (#1273)
Support is added for all of the non-type expression contexts where we currently accept built-in conversions, such as reordering the fields in a struct.
This commit is contained in:
@@ -200,6 +200,7 @@ void Expression::Print(llvm::raw_ostream& out) const {
|
||||
case ExpressionKind::StringTypeLiteral:
|
||||
case ExpressionKind::TypeTypeLiteral:
|
||||
case ExpressionKind::ContinuationTypeLiteral:
|
||||
case ExpressionKind::ValueLiteral:
|
||||
PrintID(out);
|
||||
break;
|
||||
}
|
||||
@@ -236,6 +237,10 @@ void Expression::PrintID(llvm::raw_ostream& out) const {
|
||||
case ExpressionKind::ContinuationTypeLiteral:
|
||||
out << "Continuation";
|
||||
break;
|
||||
case ExpressionKind::ValueLiteral:
|
||||
// FIXME: For layering reasons, we can't print out the value from here.
|
||||
out << "ValueLiteral";
|
||||
break;
|
||||
case ExpressionKind::IndexExpression:
|
||||
case ExpressionKind::FieldAccessExpression:
|
||||
case ExpressionKind::CompoundFieldAccessExpression:
|
||||
|
||||
Reference in New Issue
Block a user