empty.carbon 920 B

1234567891011121314151617181920212223
  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. var x: {} = {};
  7. var y: {} = x;
  8. // CHECK:STDOUT: file "empty.carbon" {
  9. // CHECK:STDOUT: %.loc7_9.1: type = struct_type {}
  10. // CHECK:STDOUT: %.loc7_9.2: {} = struct_literal ()
  11. // CHECK:STDOUT: %.loc7_9.3: type = tuple_type ()
  12. // CHECK:STDOUT: %x: ref {} = var "x"
  13. // CHECK:STDOUT: %.loc7_14.1: {} = struct_literal ()
  14. // CHECK:STDOUT: %.loc7_14.2: init {} = struct_init %.loc7_14.1, ()
  15. // CHECK:STDOUT: assign %x, %.loc7_14.2
  16. // CHECK:STDOUT: %.loc8_9: {} = struct_literal ()
  17. // CHECK:STDOUT: %y: ref {} = var "y"
  18. // CHECK:STDOUT: %x.ref: ref {} = name_reference "x", %x
  19. // CHECK:STDOUT: %.loc8_13: init {} = struct_init %x.ref, ()
  20. // CHECK:STDOUT: assign %y, %.loc8_13
  21. // CHECK:STDOUT: }