mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 17:30:29 +00:00
This shifts logic a little so that empty top-level scopes are printed less often. This affects imports mainly for now, but should be expected to affect the soon-to-be-added generated scope more significantly. Assisted-by: Google Antigravity with Gemini 3 Flash
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
// 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
|
|
//
|
|
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/alias/local.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/alias/local.carbon
|
|
|
|
// --- local.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
fn F() -> () {
|
|
var a: () = ();
|
|
//@dump-sem-ir-begin
|
|
alias b = a;
|
|
//@dump-sem-ir-end
|
|
return b;
|
|
}
|
|
|
|
// CHECK:STDOUT: --- local.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() -> out %return.param: %empty_tuple.type {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: %a.ref: ref %empty_tuple.type = name_ref a, %a
|
|
// CHECK:STDOUT: %b: ref %empty_tuple.type = alias_binding b, %a
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|