-
Notifications
You must be signed in to change notification settings - Fork 132
Closed
Labels
Description
Problem
Unintentionally, #198 opens the door to unintended interactions between ScratchVar and recursive @Subroutines. #230 explores the topic.
We must either implement an improvement or revert #198 to avoid releasing software with known unintended behavior.
Solution
Fail TEAL source compilation when a recursive @Subroutine containing a ScratchVar parameter exists.
Rationale:
- Since
DynamicScratchVaris a new abstraction and we don't know how pervasively it'll be used, the ticket requests constraining usage until we get feedback otherwise. - We discussed these alternatives and deemed the benefit-vs-cost tradeoff to be weaker than the proposed solution:
- Support for recursion.
- Add guard rails around allowed recursion cases.
Additionally:
- Add an inline comment explaining that no technical barrier exists to supporting DynamicScratchVar: User-defined DynamicScratchVars in @Subroutines produce opaque errors #232, though we're opting to defer support. Goal is to help future maintainers understand why the constraint exists.
Dependencies
N/A
Urgency
High - master cannot be safely tagged.