瀏覽代碼

fix: multiple files import the same api file (#3642)

7134g 1 年之前
父節點
當前提交
117c3a9069
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      tools/goctl/api/parser/g4/ast/apiparser.go

+ 1 - 0
tools/goctl/api/parser/g4/ast/apiparser.go

@@ -156,6 +156,7 @@ func (p *Parser) invokeImportedApi(filename string, imports []*ImportExpr) ([]*A
 		}
 		// ignore already imported file
 		if p.alreadyImported(impPath) {
+			p.importStatck.pop()
 			continue
 		}
 		p.fileMap[impPath] = PlaceHolder{}