| 110 | for (const [m, arity] of more) if (!methods.has(m)) methods.set(m, arity); |
| 111 | }; |
| 112 | const embedded = (type, imports) => { |
| 113 | if (type?.type === 'pointer_type') type = type.namedChildren[0]; |
| 114 | if (type?.type === 'generic_type') type = type.childForFieldName('type'); |
| 115 | if (type?.type === 'qualified_type') { |
| 116 | take(methodsOf(imports.get(type.childForFieldName('package').text), type.childForFieldName('name').text, seen)); |
| 117 | } else if (type?.type === 'type_identifier') { |
| 118 | if (type.text === 'error') take(new Map([['Error', '0/1']])); |
| 119 | else take(methodsOf(importPath, type.text, seen)); |
| 120 | } |
| 121 | }; |
| 122 | const type = declared.type; |
| 123 | if (type?.type === 'interface_type') { |
| 124 | for (const element of type.namedChildren) { |