Skip to content

Local variables in function bodies shadow outer local variables when inlined #13

@kevinyeeeee

Description

@kevinyeeeee

local variables in function bodies will currently shadow the outer scope when inlined. For example the program

x = 5
return f(0)

with

def f(x):
  x = "cat"
  return x

inlines to

x = 5
x = "cat"
return x

but this is not what we want since we lose the value of x that we initially assigned, so we might have to uniquify names or something

Originally posted by @kevinyeeeee in #11 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions