DeadCodeDetector: False positives for ADTs used after `TypeCast`
jubnzv opened this issue · comments
Georgiy Komarov commented
Here is a MRE:
scilla_version 0
library Dead5
type Ty =
| Ty
contract Dead5 ()
transition Dead5()
address = 0x0000000000000000000000000000000000000000;
maybe_contract_address <-& address as ByStr20 with contract end;
match maybe_contract_address with
| None =>
| Some _ =>
ty = Ty (* Ty is marked as dead *)
end
end
The problem is that the analysis cannot collect information about used ADTs that come after the TypeCast
statement.
This causes the following problem: #1091 (comment)