fail_todo_self_in_interface_param.carbon 1023 B

12345678910111213141516171819202122232425
  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. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/facet/fail_todo_self_in_interface_param.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/facet/fail_todo_self_in_interface_param.carbon
  12. interface I(T:! type) {
  13. let I1:! type;
  14. }
  15. // @dump-sem-ir-begin
  16. // CHECK:STDERR: fail_todo_self_in_interface_param.carbon:[[@LINE+4]]:12: error: name `.Self` not found [NameNotFound]
  17. // CHECK:STDERR: fn F(T:! I(.Self) where .I1 = ()) -> T.I1 {
  18. // CHECK:STDERR: ^~~~~
  19. // CHECK:STDERR:
  20. fn F(T:! I(.Self) where .I1 = ()) -> T.I1 {
  21. return ();
  22. }
  23. // @dump-sem-ir-end