google / starlark-go

Starlark in Go: the Starlark configuration language, implemented in Go
BSD 3-Clause "New" or "Revised" License
2.31k stars 210 forks source link

about reassignment limit #483

Open FoundryPro opened 1 year ago

FoundryPro commented 1 year ago

what is the limit? can't reassign in the same root scope.

but when i use the same name from predeclared via var declaration or load, it's not reassign (got no error).

if i load a method twice, i got errors.

if the load method has the same name with predeclared, i got no errors. but if i assign a value to that predeclared value, and then load the very method, it got errors.