When performing name lookup, determine the generic instance within which the lookup result was found. (#4118)

Require types into which qualified lookup is performed to be completely
defined. Eventually this will trigger substitution into the definition
for generic types.
This commit is contained in:
Richard Smith
2024-07-10 18:35:55 +00:00
committed by GitHub
parent a4ef5dd591
commit 6d3c915bbf
20 changed files with 422 additions and 89 deletions
@@ -44,9 +44,10 @@ impl C as I {
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
// CHECK:STDOUT: %.6: type = ptr_type %.5 [template]
// CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template]
// CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template]
// CHECK:STDOUT: %.6: <witness> = interface_witness (%F.3) [template]
// CHECK:STDOUT: %.7: <witness> = interface_witness (%F.3) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -89,7 +90,7 @@ impl C as I {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl: %C as %.1 {
// CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {}
// CHECK:STDOUT: %.1: <witness> = interface_witness (%F.decl) [template = constants.%.6]
// CHECK:STDOUT: %.1: <witness> = interface_witness (%F.decl) [template = constants.%.7]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %F.decl