fix relative path bugs

This commit is contained in:
CaiHQ 2023-07-03 17:57:13 +08:00
parent 5598a2ba8c
commit bc7a54e9ce
2 changed files with 6 additions and 3 deletions

View File

@ -135,7 +135,12 @@ public class ContractNode {
functionMap.put(fn.functionName, fn);
}
for (InterfaceNode interfaceNode : contract.interfaceMap.values()) {
interfaceMap.put(interfaceNode.functionName, interfaceNode);
InterfaceNode oldIntf = interfaceMap.get(interfaceNode.functionName);
if (oldIntf == null)
interfaceMap.put(interfaceNode.functionName, interfaceNode);
else {
oldIntf.annotations.addAll(interfaceNode.annotations);
}
}
sharables.addAll(contract.getSharables());
clzs.addAll(contract.clzs);

View File

@ -16,8 +16,6 @@ public class ImportNode {
public String getPath() {
if (path.startsWith("@"))
return path.replaceAll("@", "/.depyjs/");
if (!path.startsWith("/"))
return "/" + path;
return path;
}
}