fail_nondeducible_parameter.carbon 507 B

123456789101112131415
  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. // NOAUTOUPDATE
  6. package ExplorerTest api;
  7. interface A(T:! type) {}
  8. interface B {}
  9. // CHECK:STDERR: COMPILATION ERROR: fail_nondeducible_parameter.carbon:[[@LINE+1]]: parameter `T:! type` is not deducible from `impl i32 as interface B`
  10. impl forall [T:! type] i32 as A(T) & B {}
  11. fn Main() -> i32 { return 0; }