Track complete types required by a generic. (#4652)

When a generic requires a symbolic type to be complete, add a new
`require_complete_type` instruction to the generic eval block. During
monomorphization of such an instruction, require that type to be
complete.
This commit is contained in:
Richard Smith
2024-12-10 03:00:28 +00:00
committed by GitHub
parent e75ef34591
commit eabe9f117a
107 changed files with 1357 additions and 291 deletions
+2 -2
View File
@@ -293,7 +293,7 @@ var v: C(123) = ();
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template]
// CHECK:STDOUT: %C.1: type = class_type @C, @C(%N.1) [symbolic]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
// CHECK:STDOUT: %complete_type.1: <witness> = complete_type_witness %empty_struct_type [template]
// CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [template]
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%int_32) [template]
@@ -352,7 +352,7 @@ var v: C(123) = ();
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: class {
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type.1]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = constants.%C.1