tuple_equality3.carbon 619 B

12345678910111213141516171819202122
  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. // RUN: not executable_semantics %s 2>&1 2>&1 | FileCheck %s
  6. package ExecutableSemanticsTest api;
  7. fn main() -> i32 {
  8. var t1: (i32,i32) = (5, 2);
  9. var t2: (i32,) = (5,);
  10. if (t1 == t2) {
  11. return 1;
  12. } else {
  13. return 0;
  14. }
  15. }
  16. // AUTOUPDATE: executable_semantics %s
  17. // CHECK: COMPILATION ERROR: {{.*}}/tuple_equality3.carbon:12: type error in ==
  18. // CHECK: expected: (0 = i32, 1 = i32)
  19. // CHECK: actual: (0 = i32)