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: False positives on unused ADT constructors in nested `match` #1106

Closed jubnzv closed 2 years ago

jubnzv commented 2 years ago

MRE:

scilla_version 0

library Dead

type A =
  | A1 of ByStr20
  | A2 of String

type B =
  | B1 of A

contract Dead ()

transition Foo(e: B)
  match e with
  | B1 address =>
    match address with
    | A1 addr =>
    | A2 addr =>
    end
  end
end

A1 and A2 are reported as unused.

jubnzv commented 2 years ago

Closed with #1113