Polymorphic type not found in lambda
Suppose the following CameLIGO contract:
let const = fun (type a b) (a, b : a * b) : a -> a
let main (_ : unit * unit) : operation list * unit =
[], const ((), 0)
Trying to compile it in the LIGO Playground results in "Type "a" not found."
Note that using an ordinary declaration works as intended:
let const (type a b) (a, b : a * b) : a = a
let main (_ : unit * unit) : operation list * unit =
[], const ((), 0)
Another variation that works is this:
let const (type a b) = fun (a, b : a * b) : a -> a
let main (_ : unit * unit) : operation list * unit =
[], const ((), 0)