Skip to content

Commit

Permalink
Fix: avoid parenthesis for primitive int and float
Browse files Browse the repository at this point in the history
  • Loading branch information
eldesh committed Nov 7, 2024
1 parent f018259 commit f51d347
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ impl Type {
TypeBinding::Unbound(..) => TypePriority::MAX,
},
Function(_) => TypePriority::FUN,
TypeApplication(ctor, _) if ctor.is_polymorphic_int_type() => TypePriority::MAX,
TypeApplication(ctor, _) if ctor.is_polymorphic_float_type() => TypePriority::MAX,
TypeApplication(ctor, _) => {
if ctor.is_pair_type() {
TypePriority::PAIR
Expand Down

0 comments on commit f51d347

Please sign in to comment.