empty_params.carbon 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/convert.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/generic/empty_params.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/generic/empty_params.carbon
  14. class C[]();
  15. // CHECK:STDOUT: --- empty_params.carbon
  16. // CHECK:STDOUT:
  17. // CHECK:STDOUT: constants {
  18. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  19. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  20. // CHECK:STDOUT: }
  21. // CHECK:STDOUT:
  22. // CHECK:STDOUT: imports {
  23. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  24. // CHECK:STDOUT: import Core//prelude
  25. // CHECK:STDOUT: import Core//prelude/...
  26. // CHECK:STDOUT: }
  27. // CHECK:STDOUT: }
  28. // CHECK:STDOUT:
  29. // CHECK:STDOUT: file {
  30. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  31. // CHECK:STDOUT: .Core = imports.%Core
  32. // CHECK:STDOUT: .C = %C.decl
  33. // CHECK:STDOUT: }
  34. // CHECK:STDOUT: %Core.import = import Core
  35. // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {} {}
  36. // CHECK:STDOUT: }
  37. // CHECK:STDOUT:
  38. // CHECK:STDOUT: class @C;
  39. // CHECK:STDOUT: