| 12345678910111213141516171819202122232425262728293031 |
- // 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
- package ExplorerTest api;
- interface X(T:! type) {}
- interface Y(T:! type) {
- let M:! X(T);
- }
- interface Z {
- // The `i32 impls X(.Self)` constraint is indirectly required by
- // specifying that `.M = i32`.
- let N:! Y(.Self) where i32 impls X(.Self) and .M = i32;
- }
- impl i32 as X(i32) {}
- impl i32 as Y(i32) where .M = i32 {}
- impl i32 as Z where .N = i32 {}
- fn F[A:! Z](a: A) -> A { return a; }
- fn Main() -> i32 {
- return F(0);
- }
- // CHECK:STDOUT: result: 0
|