Allow extend adapt of non-class types. (#4544)

Stop rejecting `extend adapt` of non-class types such as struct and
tuple. These don't actually work just yet because name lookup into
struct and tuple types is a special case that doesn't handle adapters,
but this gets us a bit closer.

This also slightly improves error recovery for name lookup into an
invalid scope.
This commit is contained in:
Richard Smith
2024-11-18 16:01:44 +00:00
committed by GitHub
parent bc395eb889
commit 145f878ce8
17 changed files with 269 additions and 36 deletions
@@ -49,6 +49,7 @@ fn A() {
// CHECK:STDOUT: %.loc16: ref <error> = deref <error>
// CHECK:STDOUT: %A.ref.loc20: %A.type = name_ref A, file.%A.decl [template = constants.%A]
// CHECK:STDOUT: %.loc20: ref <error> = deref <error>
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [template = <error>]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT: