Closed vitorpy closed 2 months ago
@anton-trunov Sorry, can you provide some guidance here on which cases this is expected to cover? ie. which test cases are missing?
@anton-trunov @novusnota Hey guys, should this be allowed?
Hey guys, should this be allowed?
@vitorpy Tact doesn't have first-class functions, so we can allow such declarations, I think. Let's wait for input from @anton-trunov though.
Tact doesn't have first-class functions, so we can allow such declarations
This is an instance of type-directed disambiguation and it's an opportunity to mess up. I say we go for simplicity and ban this, no shadowing should be allowed at this moment. I mean it's easier to ban some behavior and relax the restrictions in later language versions. And it's backwards compatible!
@vitorpy Let's disallow let sender: Address = sender()
Closes #307
Just checking if this is a sensible approach to handle avoiding variable declarations from shadowing functions.
I'm guessing I should also avoid shadowing other identifiers, such as contract names? Also non-static functions I guess.