leo/tests/compiler/address/ternary.leo

14 lines
380 B
Plaintext
Raw Normal View History

2021-04-20 04:08:14 +03:00
/*
namespace: Compile
expectation: Pass
input_file:
2021-05-03 16:47:33 +03:00
- inputs/address1.in
- inputs/address2.in
2021-04-20 04:08:14 +03:00
*/
function main(x: address) -> bool {
2022-06-09 01:33:12 +03:00
const sender: address = aleo1l7ytv5jqjzpxtjqttl5z9mle8ujcpac9t6tkge5f4haah4pxas8sagzecd;
const receiver: address = aleo1dtpkpg3d653mdlzh6g028937qdgujecn5gw5tzh7ftcvyz7jxvfqw6t8p6;
2021-04-20 04:08:14 +03:00
return x == sender ? receiver == x : sender == x;
}