fail_todo_impl_assoc_const.carbon 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon
  10. interface I { let T:! type; }
  11. // CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+3]]:14: error: semantics TODO: `HandleWhereOperand`
  12. // CHECK:STDERR: impl bool as I where .T = bool {}
  13. // CHECK:STDERR: ^~~~~~~
  14. impl bool as I where .T = bool {}
  15. // CHECK:STDOUT: --- fail_todo_impl_assoc_const.carbon
  16. // CHECK:STDOUT:
  17. // CHECK:STDOUT: constants {
  18. // CHECK:STDOUT: %.1: type = interface_type @I [template]
  19. // CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic]
  20. // CHECK:STDOUT: %.2: type = assoc_entity_type %.1, type [template]
  21. // CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template]
  22. // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template]
  23. // CHECK:STDOUT: %.4: type = tuple_type () [template]
  24. // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template]
  25. // CHECK:STDOUT: }
  26. // CHECK:STDOUT:
  27. // CHECK:STDOUT: file {}
  28. // CHECK:STDOUT:
  29. // CHECK:STDOUT: interface @I {
  30. // CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self]
  31. // CHECK:STDOUT: %T: type = assoc_const_decl T [template]
  32. // CHECK:STDOUT: %.loc11: %.2 = assoc_entity element0, %T [template = constants.%.3]
  33. // CHECK:STDOUT:
  34. // CHECK:STDOUT: !members:
  35. // CHECK:STDOUT: .Self = %Self
  36. // CHECK:STDOUT: .T = %.loc11
  37. // CHECK:STDOUT: witness = (%T)
  38. // CHECK:STDOUT: }
  39. // CHECK:STDOUT:
  40. // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type";
  41. // CHECK:STDOUT: