Implement char operations from #6710 (#7266)

This only covers `char`, and does not include the `CharLiteral`
operations.

Assisted-by: Gemini via Antigravity
This commit is contained in:
Richard Smith
2026-05-27 23:18:27 +00:00
committed by GitHub
parent 9986d0da69
commit e45045d63b
4 changed files with 1142 additions and 5 deletions
@@ -890,7 +890,7 @@ fn F() {
// CHECK:STDOUT: %ImplicitAs.impl_witness.805: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.fad [concrete]
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.f44 = facet_value Core.CharLiteral, (%ImplicitAs.impl_witness.805) [concrete]
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.904: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%char, %ImplicitAs.facet) [concrete]
// CHECK:STDOUT: %.0ca: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.904, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %.0ca3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.904, %ImplicitAs.facet [concrete]
// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete]
// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %.d16, %Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete]
@@ -931,7 +931,7 @@ fn F() {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %.loc8_11.1: Core.CharLiteral = char_value U+0058 [concrete = constants.%.d16]
// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.0ca = impl_witness_access constants.%ImplicitAs.impl_witness.805, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert]
// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.0ca3 = impl_witness_access constants.%ImplicitAs.impl_witness.805, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert]
// CHECK:STDOUT: %bound_method.loc8_11.1: <bound method> = bound_method %.loc8_11.1, %impl.elem0.loc8_11.1 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call: init %char = call %bound_method.loc8_11.1(%.loc8_11.1) [concrete = constants.%int_88]
// CHECK:STDOUT: %.loc8_11.2: %char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_88]