| 12345678910111213141516171819202122232425262728293031323334353637 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/var/no_prelude/global_decl.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/no_prelude/global_decl.carbon
- var x: {.v: ()};
- // CHECK:STDOUT: --- global_decl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [concrete]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.v [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .x = %x
- // CHECK:STDOUT: }
- // CHECK:STDOUT: name_binding_decl {
- // CHECK:STDOUT: %x.patt: %pattern_type = binding_pattern x [concrete]
- // CHECK:STDOUT: %x.var_patt: %pattern_type = var_pattern %x.patt [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %x.var: ref %struct_type.v = var %x.var_patt [concrete]
- // CHECK:STDOUT: %.loc11_15: type = splice_block %struct_type.v [concrete = constants.%struct_type.v] {
- // CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal ()
- // CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [concrete = constants.%struct_type.v]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|