Handle use-before-declare in static name lookup (#967)

Also remove inheritance from NamedEntity for some classes that don't need it.
This commit is contained in:
Geoff Romer
2021-12-03 13:52:31 -08:00
committed by GitHub
parent b83f00225a
commit f75b4d322f
14 changed files with 163 additions and 266 deletions
@@ -7,7 +7,7 @@
// RUN: not executable_semantics --trace %s 2>&1 | \
// RUN: FileCheck --match-full-lines --allow-unused-prefixes %s
// AUTOUPDATE: executable_semantics %s
// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_choice_duplicate.carbon:16: Duplicate name `None` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_choice_duplicate.carbon:15
// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_choice_duplicate.carbon:16: Duplicate name `None` in choice type
package ExecutableSemanticsTest api;
@@ -7,7 +7,7 @@
// RUN: not executable_semantics --trace %s 2>&1 | \
// RUN: FileCheck --match-full-lines --allow-unused-prefixes %s
// AUTOUPDATE: executable_semantics %s
// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_use_before_declare.carbon:15: could not find `x`
// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_use_before_declare.carbon:15: could not resolve 'x'
package ExecutableSemanticsTest api;