Browse Source

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

7134g 1 năm trước cách đây
mục cha
commit
117c3a9069
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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{}