fail_combine_equality.carbon 665 B

123456789101112131415161718192021
  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. package ExplorerTest api;
  7. interface I {}
  8. impl i32 as I {}
  9. fn F(A:! i32, B:! i32, C:! i32, D:! i32, E:! i32,
  10. T:! I where A == B and C == D and C == E and B == D) {
  11. // CHECK:STDERR: COMPILATION ERROR: explorer/testdata/constraint/fail_combine_equality.carbon:[[@LINE+1]]: member access, F not in interface I where T impls interface I and A == B and C == D and C == E and B == D
  12. T.F();
  13. }
  14. fn Main() -> i32 {
  15. F(1, 1, 1, 1, 1, i32);
  16. return 0;
  17. }