mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:51:09 +01:00
Rename and rearrange entities in tests to avoid name reuse (#7656)
Fix a bunch of cases where we use the same external name to mean multiple different things in the same test. We've historically gotten away with this, but under `--share-cpp-ast`, it becomes an error, at least if the entity is either defined in, or used from, C++ code. Assisted-by: Gemini via Antigravity (original change) and Claude Code (suggested edits in review) --------- Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
co-authored by
Chandler Carruth
parent
6eb900dff5
commit
c588eadb57
@@ -29,17 +29,17 @@ library "[[@TEST_NAME]]";
|
||||
import Cpp;
|
||||
|
||||
// CHECK:STDERR: fail_var_unsupported_type.carbon:[[@LINE+4]]:5: error: semantics TODO: `failed to map Carbon type to C++` [SemanticsTodo]
|
||||
// CHECK:STDERR: var x: () = ();
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR: var unsupported_x: () = ();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
var x: () = ();
|
||||
var unsupported_x: () = ();
|
||||
|
||||
inline Cpp '''
|
||||
void F() {
|
||||
// CHECK:STDERR: fail_var_unsupported_type.carbon:[[@LINE+4]]:11: error: no member named 'x' in namespace 'Carbon' [CppInteropParseError]
|
||||
// CHECK:STDERR: 17 | Carbon::x;
|
||||
// CHECK:STDERR: | ^
|
||||
// CHECK:STDERR: fail_var_unsupported_type.carbon:[[@LINE+4]]:11: error: no member named 'unsupported_x' in namespace 'Carbon' [CppInteropParseError]
|
||||
// CHECK:STDERR: 17 | Carbon::unsupported_x;
|
||||
// CHECK:STDERR: | ^~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Carbon::x;
|
||||
Carbon::unsupported_x;
|
||||
}
|
||||
''';
|
||||
|
||||
Reference in New Issue
Block a user