Skip to content

Commit

Permalink
Fix function that don't typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
danhper committed Aug 3, 2024
1 parent 2e7d319 commit 81e72e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
### Bug fixes

* Fix parsing of fix bytes with less than 32 bytes (e.g. bytes4)
* Fix display of functions that don't check argument types

## 0.1.1 (2024-07-30)

Expand Down
5 changes: 4 additions & 1 deletion src/interpreter/functions/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ impl std::cmp::Eq for Function {}

impl fmt::Display for Function {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let variants = self.get_variants();
let mut variants = self.get_variants();
if variants.is_empty() {
variants = vec![format!("{}(any... args)", self.def.name())];
}
for (i, variant) in variants.iter().enumerate() {
if i > 0 {
writeln!(f)?;
Expand Down

0 comments on commit 81e72e1

Please sign in to comment.