mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 22:02:45 +01:00
This shifts logic so that bindings are added to name lookup only after the scope is complete, removing logic around adding/removing/re-adding names in certain scopes. This does mean that things like a function's forward declaration will need to go through an extra hoop for name conflict checks, because under this approach a function definition does conflict checking when it adds names for the body's use. But, that seems easy to address, and better than the current hoops.
25 lines
646 B
Plaintext
25 lines
646 B
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
|
|
//
|
|
// AUTOUPDATE
|
|
// CHECK:STDOUT: cross_reference_irs_size: 1
|
|
// CHECK:STDOUT: functions: [
|
|
// CHECK:STDOUT: ]
|
|
// CHECK:STDOUT: integer_literals: [
|
|
// CHECK:STDOUT: ]
|
|
// CHECK:STDOUT: real_literals: [
|
|
// CHECK:STDOUT: ]
|
|
// CHECK:STDOUT: strings: [
|
|
// CHECK:STDOUT: ]
|
|
// CHECK:STDOUT: types: [
|
|
// CHECK:STDOUT: ]
|
|
// CHECK:STDOUT: nodes: [
|
|
// CHECK:STDOUT: ]
|
|
// CHECK:STDOUT: node_blocks: [
|
|
// CHECK:STDOUT: [
|
|
// CHECK:STDOUT: ],
|
|
// CHECK:STDOUT: ]
|
|
|
|
;
|