Skip to content

Commit 2164cae

Browse files
committed
Handle type paths
1 parent d149dc0 commit 2164cae

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tooling/nargo_cli/src/cli/expand_cmd/printer.rs

+14
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,20 @@ impl<'interner, 'def_map, 'string> ItemPrinter<'interner, 'def_map, 'string> {
873873
self.push_str(&name);
874874
return name;
875875
}
876+
877+
if let Some(self_type) = &func_meta.self_type {
878+
if self_type.is_primitive() {
879+
// Type path, like `Field::method(...)`
880+
self.show_type(self_type);
881+
self.push_str("::");
882+
883+
let name = self.interner.function_name(&func_id).to_string();
884+
self.push_str(&name);
885+
return name;
886+
}
887+
}
888+
889+
dbg!(&func_meta.self_type);
876890
}
877891

878892
if use_import {

0 commit comments

Comments
 (0)