ligo/src/test/contracts/option.ligo

16 lines
255 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
2019-10-07 17:11:46 +04:00
{
coco := Some(m);
coco := None;
}
with coco