Files
carbon-lang/proposals
f63169608e Implicit conversions (#820)
Proposal to support a limited set of implicit conversions.

This would generally permit only implicit conversions that are lossless and semantics-preserving. In particular, this proposal allows:

-   Conversion from an integer type to a wider integer type of the same signedness, and from an unsigned integer type to a wider signed integer type.
-   Conversion from an integer type to a floating-point type that has enough mantissa bits to exactly represent all integers in the source type.
-   Conversion from integer literals to integer and floating-point types that can represent them.
-   Conversion from floating-point literals to floating-point types that can represent them.
-   Conversions required for generics: conversions of values between facet types, and conversions of types between type-of-types, as described in the generics proposals.
-   Conversions required for inheritance: derived-to-base conversions for class pointers and class values.

Other conversions, such as lossy conversions between arithmetic types and conversions between bool and other types are not supported.

Co-authored-by: josh11b <josh11b@users.noreply.github.com>
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Co-authored-by: Geoff Romer <gromer@google.com>
2021-09-21 15:16:16 -07:00
..
2021-08-25 14:15:01 -07:00
2021-04-23 17:19:23 -07:00
2021-04-21 13:00:03 -07:00
2021-04-21 10:06:44 -07:00
2021-05-14 15:38:45 -07:00
2021-05-07 14:27:21 -07:00
2021-04-13 20:57:17 -07:00
2021-05-10 16:42:01 -07:00
2021-06-29 10:52:45 -07:00
2021-08-10 20:46:23 -07:00
2021-07-08 10:39:36 -07:00
2021-07-09 11:49:32 -07:00
2021-07-22 10:42:54 -07:00
2021-08-04 14:27:11 -07:00
2021-08-03 15:37:18 -07:00
2021-08-27 16:53:21 -07:00
2021-09-21 09:33:32 -07:00
2021-09-08 17:37:35 -07:00
2021-09-21 15:16:16 -07:00
2021-09-21 09:45:35 -07:00
2021-09-21 15:16:16 -07:00
2021-08-27 16:53:21 -07:00

Proposals

This directory contains accepted proposals for the carbon-lang repository. For information about declined/deferred proposals, please view the proposal's original pull request.

For accepted proposals, where #### is the corresponding proposal's pull request:

  • p####.md will contain the main proposal text.
  • p#### may be present as an optional subdirectory for related files (for example, images).

Proposal list