From bc7a54e9ceb9c2e74ca68f43946d94d5203019f6 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Mon, 3 Jul 2023 17:57:13 +0800 Subject: [PATCH] fix relative path bugs --- src/main/base/org/bdware/sc/node/ContractNode.java | 7 ++++++- src/main/base/org/bdware/sc/node/ImportNode.java | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/base/org/bdware/sc/node/ContractNode.java b/src/main/base/org/bdware/sc/node/ContractNode.java index a611046..8c84638 100644 --- a/src/main/base/org/bdware/sc/node/ContractNode.java +++ b/src/main/base/org/bdware/sc/node/ContractNode.java @@ -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); diff --git a/src/main/base/org/bdware/sc/node/ImportNode.java b/src/main/base/org/bdware/sc/node/ImportNode.java index 984ec51..6e24cbf 100644 --- a/src/main/base/org/bdware/sc/node/ImportNode.java +++ b/src/main/base/org/bdware/sc/node/ImportNode.java @@ -16,8 +16,6 @@ public class ImportNode { public String getPath() { if (path.startsWith("@")) return path.replaceAll("@", "/.depyjs/"); - if (!path.startsWith("/")) - return "/" + path; return path; } }