h2: fix implementation of Value.gt not actually being a greater-than operation

how did I miss that (a < b) is the same as (b > a) is beyond me
This commit is contained in:
りき萌 2025-09-02 20:30:47 +02:00
parent 958201cd18
commit c4ad609717

View file

@ -48,7 +48,7 @@ pub const Value = union(enum) {
} }
pub fn gt(a: Value, b: Value) ?bool { pub fn gt(a: Value, b: Value) ?bool {
return !a.eql(b) and !(a.lt(b) orelse return null); return b.lt(a);
} }
pub fn typeName(value: Value) []const u8 { pub fn typeName(value: Value) []const u8 {