convert.carbon 454 B

123456789101112131415
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. // A minimal prelude for testing conversion between types.
  5. package Core library "prelude";
  6. interface As(Dest:! type) {
  7. fn Convert[self: Self]() -> Dest;
  8. }
  9. interface ImplicitAs(Dest:! type) {
  10. // TODO: extend As(Dest);
  11. fn Convert[self: Self]() -> Dest;
  12. }