| 12345678910111213141516171819202122232425 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // AUTOUPDATE
- // RUN: %{not} %{explorer-run}
- // RUN: %{not} %{explorer-run-trace}
- package ExplorerTest api;
- interface HasThreeTypes {
- let A:! Type;
- let B:! Type;
- let C:! Type;
- fn Make[me: Self]() -> (A, B, C);
- }
- fn F[T:! Type](x: (T, T, T));
- fn G[X:! HasThreeTypes where .A == .B and .B == .C and .C == .A](x: X) {
- // CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/assoc_const/fail_multiple_deduction.carbon:[[@LINE+3]]: deduced multiple different values for T:! Type:
- // CHECK:STDERR: (X).A
- // CHECK:STDERR: (X).B
- F(x.Make());
- }
- fn Main() -> i32 { return 0; }
|