quick sort

This commit is contained in:
agra
2026-02-10 18:58:04 +02:00
parent a6f0276fa5
commit 3fde080092
8 changed files with 326 additions and 30 deletions

View File

@@ -180,6 +180,10 @@ pub const Type = union(enum) {
/// Everything else requires `xx`.
pub fn isImplicitlyConvertibleTo(self: Type, target: Type) bool {
if (std.meta.eql(self, target)) return true;
// Slice types: compare element names by content (not pointer)
if (self.isSlice() and target.isSlice()) {
return std.mem.eql(u8, self.slice_type.element_name, target.slice_type.element_name);
}
const src_float = self.isFloat();
const dst_float = target.isFloat();