generic.carbon 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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/class/generic.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic.carbon
  10. class C[]();
  11. // CHECK:STDOUT: --- generic.carbon
  12. // CHECK:STDOUT:
  13. // CHECK:STDOUT: constants {
  14. // CHECK:STDOUT: %C.type: type = generic_class_type @C [template]
  15. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template]
  16. // CHECK:STDOUT: }
  17. // CHECK:STDOUT:
  18. // CHECK:STDOUT: imports {
  19. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  20. // CHECK:STDOUT: import Core//prelude
  21. // CHECK:STDOUT: import Core//prelude/...
  22. // CHECK:STDOUT: }
  23. // CHECK:STDOUT: }
  24. // CHECK:STDOUT:
  25. // CHECK:STDOUT: file {
  26. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  27. // CHECK:STDOUT: .Core = imports.%Core
  28. // CHECK:STDOUT: .C = %C.decl
  29. // CHECK:STDOUT: }
  30. // CHECK:STDOUT: %Core.import = import Core
  31. // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] {} {}
  32. // CHECK:STDOUT: }
  33. // CHECK:STDOUT:
  34. // CHECK:STDOUT: class @C;
  35. // CHECK:STDOUT: