empty.carbon 1.4 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. interface Empty {
  7. }
  8. impl i32 as Empty {
  9. }
  10. // CHECK:STDOUT: --- empty.carbon
  11. // CHECK:STDOUT:
  12. // CHECK:STDOUT: constants {
  13. // CHECK:STDOUT: %.1: type = interface_type @Empty [template]
  14. // CHECK:STDOUT: %.2: <witness> = interface_witness () [template]
  15. // CHECK:STDOUT: }
  16. // CHECK:STDOUT:
  17. // CHECK:STDOUT: file {
  18. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  19. // CHECK:STDOUT: .Empty = %Empty.decl
  20. // CHECK:STDOUT: }
  21. // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%.1] {}
  22. // CHECK:STDOUT: impl_decl @impl {
  23. // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, %Empty.decl [template = constants.%.1]
  24. // CHECK:STDOUT: }
  25. // CHECK:STDOUT: }
  26. // CHECK:STDOUT:
  27. // CHECK:STDOUT: interface @Empty {
  28. // CHECK:STDOUT: %Self: Empty = bind_symbolic_name Self [symbolic]
  29. // CHECK:STDOUT:
  30. // CHECK:STDOUT: !members:
  31. // CHECK:STDOUT: .Self = %Self
  32. // CHECK:STDOUT: witness = ()
  33. // CHECK:STDOUT: }
  34. // CHECK:STDOUT:
  35. // CHECK:STDOUT: impl @impl: i32 as Empty {
  36. // CHECK:STDOUT: %.1: <witness> = interface_witness () [template = constants.%.2]
  37. // CHECK:STDOUT:
  38. // CHECK:STDOUT: !members:
  39. // CHECK:STDOUT: witness = %.1
  40. // CHECK:STDOUT: }
  41. // CHECK:STDOUT: