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 negatives for ADT constructors with the same name as ADT #1125

Closed jubnzv closed 2 years ago

jubnzv commented 2 years ago

MRE:

scilla_version 0

library Dead13

(* False negative: used ADT, but unused constructor *)
type C =
| C

let a1 = A1

let opt =
  tfun 'A => fun( default: 'A ) =>
  fun( input: Option 'A) =>
  match input with
  | Some v => v
  | None => default end

let opt_c = @opt C

contract Dead13()

transition foo()
end