ligo/src/test/contracts/option.ligo

16 lines
256 B
Plaintext
Raw Normal View History

// Test the option type in PascaLIGO
2019-05-13 00:56:22 +04:00
type foobar is option(int)
const s : foobar = Some(42)
const n : foobar = None
function assign (var m : int) : foobar is
var coco : foobar := None;
block
{
coco := Some(m);
coco := None;
}
with coco