fail_assoc_const_template.carbon 1.2 KB

123456789101112131415161718192021222324252627282930313233
  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/interface/no_prelude/fail_assoc_const_template.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon
  10. interface I {
  11. // CHECK:STDERR: fail_assoc_const_template.carbon:[[@LINE+4]]:7: error: semantics TODO: `HandleTemplate` [SemanticsTodo]
  12. // CHECK:STDERR: let template T:! type;
  13. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
  14. // CHECK:STDERR:
  15. let template T:! type;
  16. }
  17. // CHECK:STDOUT: --- fail_assoc_const_template.carbon
  18. // CHECK:STDOUT:
  19. // CHECK:STDOUT: constants {
  20. // CHECK:STDOUT: }
  21. // CHECK:STDOUT:
  22. // CHECK:STDOUT: file {}
  23. // CHECK:STDOUT:
  24. // CHECK:STDOUT: interface @I {
  25. // CHECK:STDOUT: !members:
  26. // CHECK:STDOUT: .Self = <unexpected>.inst15
  27. // CHECK:STDOUT: witness = invalid
  28. // CHECK:STDOUT: }
  29. // CHECK:STDOUT:
  30. // CHECK:STDOUT: assoc_const @T T:! type;
  31. // CHECK:STDOUT: