fail_combine_equality.carbon 740 B

1234567891011121314151617181920212223
  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. // RUN: %{not} %{explorer-run}
  7. // RUN: %{not} %{explorer-run-trace}
  8. package ExplorerTest api;
  9. interface I {}
  10. impl i32 as I {}
  11. fn F(A:! i32, B:! i32, C:! i32, D:! i32, E:! i32,
  12. T:! I where A == B and C == D and C == E and B == D) {
  13. // 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
  14. T.F();
  15. }
  16. fn Main() -> i32 {
  17. F(1, 1, 1, 1, 1, i32);
  18. return 0;
  19. }