Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion transcrypt/modules/org/transcrypt/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ def visit_arguments (self, node): # Visited for def's, not for calls
self.emit ('if (typeof {0} == \'undefined\' || ({0} != null && {0}.hasOwnProperty ("__kwargtrans__"))) {{;\n', self.filterId (arg.arg))

self.indent ()
self.emit ('var {} = ', self.filterId (arg.arg))
self.emit ('{} = ', self.filterId (arg.arg))
self.visit (expr)
self.emit (';\n')
self.dedent ()
Expand Down Expand Up @@ -1161,6 +1161,8 @@ def emitPathIndices ():
self.emit ('{}.'.format ('.'.join ([scope.node.name for scope in self.getAdjacentClassScopes ()]))) # The target is a class attribute
elif target.id in self.getScope () .nonlocals:
pass
elif (fnscope := self.getScope(ast.FunctionDef, ast.AsyncFunctionDef)) and target.id in [a.arg for a in fnscope.node.args.args]:
pass
else:
if type (self.getScope () .node) == ast.Module: # Redundant but regular
if hasattr (node, 'parentNode') and type (node.parentNode) == ast.Module and not target.id in self.allOwnNames:
Expand Down