cast_coersion.adl
1 /* 2 seed = 123456789 3 min_height = 16 4 5 [case] 6 program = "test.alpha" 7 function = "main" 8 input = ["true", "0group", "ax1x2mh70hxp6hejyrcuhd9te5ddwvwx6papw4tfpdxp00e4sf0ps9qcu8qvn"] 9 [case] 10 program = "test.alpha" 11 function = "main" 12 input = ["false", "0group", "ax1x2mh70hxp6hejyrcuhd9te5ddwvwx6papw4tfpdxp00e4sf0ps9qcu8qvn"] 13 [case] 14 program = "test.alpha" 15 function = "main" 16 input = ["true", "2group", "ax1yrmttyqs4gtm8t6dtcg2vd2mtr8p6ukmpe42cp2zm0989rmtr58q0asawh"] 17 [case] 18 program = "test.alpha" 19 function = "main" 20 input = ["false", "2group", "ax1yrmttyqs4gtm8t6dtcg2vd2mtr8p6ukmpe42cp2zm0989rmtr58q0asawh"] 21 */ 22 23 program test.alpha { 24 25 struct foo { 26 data: field, 27 } 28 29 transition main(f: bool, a: group, b: address) -> (foo, foo) { 30 let first: foo = foo { data: a as field }; 31 if f { 32 let second: foo = foo { data: 1field }; 33 return (first, second); 34 } else { 35 let second: foo = foo { data: b as field }; 36 return (first, second); 37 } 38 } 39 40 @noupgrade 41 async constructor() {} 42 }