Zilliqa / scilla

Scilla - A Smart Contract Intermediate Level Language
https://scilla-lang.org
GNU General Public License v3.0
240 stars 79 forks source link

False positive for unused library value in dead code detector #1117

Closed anton-trunov closed 2 years ago

anton-trunov commented 2 years ago

The following contract

scilla_version 0

library UnusedLibraryEntryBug

let zero_address : ByStr20 = 0x0000000000000000000000000000000000000000

contract UnusedLibraryEntryBug ()

transition Foo()
  maybe_contract_address <-& zero_address as ByStr20 with contract end
end

triggers a dead code detector false positive:

warning: [3] Unused library value: zero_address