Skip to content

Commit 55aef3e

Browse files
committed
Fixed var names.
1 parent 7397814 commit 55aef3e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/gopherjs/translator/package.go

+2
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ func (c *PkgContext) translateFunction(typeName string, isStruct bool, fun *ast.
448448
}
449449
c.info.Types[funcLit] = c.info.Objects[fun.Name].Type()
450450

451+
n := c.usedVarNames
451452
params := c.translateParams(fun.Type)
453+
c.usedVarNames = n
452454
switch {
453455
case isStruct:
454456
c.Printf("%s.prototype.%s = %s;", typeName, fun.Name.Name, c.translateExpr(funcLit))

0 commit comments

Comments
 (0)