Compilation check if MaybeValue was evaluated before accessing it's value
- 主要言語
- Python
- スター
- 288
- フォーク
- 138
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## Problem
Using a MaybeValue.value() (for ex. from AssetHolding.balance()) without evaluating it first causes a very unintuitive error message.
Currently:
```
pyteal.TealInternalError: Encountered 1 error during compilation
```
Investigating the value of `errors` in compileTeal:
```
[TealCompileError('Scratch slot load occurs before store', )]
```
The desired behaviour would be to raise an exception that mentions a MaybeValue used without evaluating it first (or remove slot dependency).
## Solution
With TEAL 4 it's possible to use `select` opcode to choose the desired parameter (ok, value) and avoid slot usage inside MaybeValue completely.
## Dependencies
None
## Urgency
Low, mostly for convenience and simpler debugging
コントリビューションガイド
評価
この issue はまだ評価されていません。