andrewCodeDev / Fluent

Fluent interface for REGEX, iteration, and algorithm chaining.
MIT License
82 stars 3 forks source link

Examine both types for generic binary operations return type #7

Closed dimdin closed 6 months ago

dimdin commented 6 months ago

https://github.com/andrewCodeDev/Fluent/blob/c1300bdce30e83dbd214717a2d51f047bf1dabb8/fluent.zig#L1205-L1217

@TypeOf(x, y) is better for return type.

The result is the same if the types are the same. Example: x: i32, y: i64, @TypeOf(x) returns i32, but @TypeOf(x, y) returns i64.

andrewCodeDev commented 6 months ago

Got it - thanks.