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

DeadCodeDetector: Handle more cases for nested constructors #1118

Closed jubnzv closed 2 years ago

jubnzv commented 2 years ago
scilla_version 0

library Dead12

type A =
| A1 (* A1 should be reported *)
| A2
type B =
| B1 of A

let a2 = A2

contract Dead12()

procedure foo(b : B)
  match b with
  | B1 (A1) =>
  | B1 (A2) => 
  end
end

transition bar()
  b = B1 a2;
  foo b
end