mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Give TupleLiteral and StructLiteral a constant value, if their contents have constant values. Their constant values are TupleValue and StructValue respectively. This supports their ability to convert to a constant type (or facet type). This way when deduce finds a TupleLiteral as the argument to a _symbolic_ facet type, it can also find a constant value to use for that argument. This allows deduction to move onto step two, where it can substitute into the symbolic parameter from previous deduced arguments, and then perform the conversion from the TupleValue to the desired facet type. Allow `PerformBuiltinConversion()` to convert from a canonical TupleValue or StructValue to `type` instead of only from literals. Then, also support conversion from a symbolic binding of type TupleType or StructType to `type`.