alias_of_alias.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. alias a = bool;
  7. alias b = a;
  8. alias c = b;
  9. let d: c = false;
  10. // CHECK:STDOUT: --- alias_of_alias.carbon
  11. // CHECK:STDOUT:
  12. // CHECK:STDOUT: constants {
  13. // CHECK:STDOUT: %.1: bool = bool_literal false [template]
  14. // CHECK:STDOUT: }
  15. // CHECK:STDOUT:
  16. // CHECK:STDOUT: file {
  17. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  18. // CHECK:STDOUT: .a = %a
  19. // CHECK:STDOUT: .b = %b
  20. // CHECK:STDOUT: .c = %c
  21. // CHECK:STDOUT: }
  22. // CHECK:STDOUT: %a: type = bind_alias a, bool [template = bool]
  23. // CHECK:STDOUT: %a.ref: type = name_ref a, %a [template = bool]
  24. // CHECK:STDOUT: %b: type = bind_alias b, %a [template = bool]
  25. // CHECK:STDOUT: %b.ref: type = name_ref b, %b [template = bool]
  26. // CHECK:STDOUT: %c: type = bind_alias c, %b [template = bool]
  27. // CHECK:STDOUT: %c.ref: type = name_ref c, %c [template = bool]
  28. // CHECK:STDOUT: %.loc10: bool = bool_literal false [template = constants.%.1]
  29. // CHECK:STDOUT: %d: bool = bind_name d, %.loc10
  30. // CHECK:STDOUT: }
  31. // CHECK:STDOUT: