5f954e8ee1ace4e6a57d4defefc7d87c30deadbe 432 B

1234567891011121314151617
  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. //
  5. // AUTOUPDATE
  6. // CHECK:STDOUT: result: 4
  7. package ExplorerTest;
  8. fn F[T:! ImplicitAs(type)](x: T) -> type { return x; }
  9. fn Main() -> i32 {
  10. var v: (i32, i32) as type = (1, 2);
  11. var w: F((i32, i32)) = (3, 4);
  12. v = w;
  13. return v[1];
  14. }