[Bug][move-compiler-v2] Move language <= 2.1 has separate function and variable namespaces #15404
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
🐛 Bug
This is related to #15360, but different. It's a well-defined semantics, but probably not what we want in a language with function values.
The Move language (through Move 2.1) has separate name spaces for function names and variables.
Consider the following program:
Note that there is both a local variable
f
and visible functionf
in the body oftest_shadowing()
. In the function call position preceding(...)
, the namef
refers to the function. In other expressions,f
refers to the local variable.The historic distinction between "Lisp 2" and "Lisp 1" isn't seeming so strange all of a sudden.
The text was updated successfully, but these errors were encountered: