mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
A Carbon floating-point literal passed as a call argument to a C++ function is mapped to `double`. If the value is too large to fit in `double`, an error is reported. This follows the C++ rules for assigning types to floating-point literals, as discussed in the [interop meeting](https://docs.google.com/document/d/1YlxEOJ0r-o19o19TCJbFl4Ln1U88yn_Vj23y1Hr5vTk/edit?tab=t.0#heading=h.9zzqn7n3o8lm) and documented in this [design doc](https://docs.google.com/document/d/18u8z9UEuGH73XzXlDynTgyNK76q1Efl8YYWbpM5LX7o/edit?tab=t.0#heading=h.6hkga1yq1f3o). Added missing tests for this as well. Part of #5915