2020-11-25 15:21:55 +00:00
|
|
|
### Compilation failed:
|
2020-11-24 17:04:47 +00:00
|
|
|
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 1: type mismatch: '+' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 add_boolean() { return false + true; }
|
|
|
|
^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 2: type mismatch: '-' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 sub_boolean() { return false - true; }
|
|
|
|
^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 3: type mismatch: '*' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 mul_boolean() { return false * true; }
|
|
|
|
^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 4: type mismatch: '/' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 div_boolean() { return false / true; }
|
|
|
|
^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 5: type mismatch: '%' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 mod_boolean() { return false % true; }
|
|
|
|
^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 6: type mismatch: '<<' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 shl_boolean() { return false << true; }
|
|
|
|
^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 7: type mismatch: '>>' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 shr_boolean() { return false >> true; }
|
|
|
|
^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 8: '-' cannot operate on 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 neg_boolean() { return -false; }
|
|
|
|
^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 9: '~' cannot operate on 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 bitnot_boolean() { return ~false; }
|
|
|
|
^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 10: type mismatch: '&' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 bitand_boolean() { return false & true; }
|
|
|
|
^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 11: type mismatch: '|' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 bitor_boolean() { return false | true; }
|
|
|
|
^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 12: type mismatch: '^' cannot operate on 'bool', 'bool'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 bitxor_boolean() { return false ^ true; }
|
|
|
|
^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 14: type mismatch: '+' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 add_boolean_vec() { return bool2(false, false) + bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 15: type mismatch: '-' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 sub_boolean_vec() { return bool2(false, false) - bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 16: type mismatch: '*' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 mul_boolean_vec() { return bool2(false, false) * bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 17: type mismatch: '/' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 div_boolean_vec() { return bool2(false, false) / bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 18: type mismatch: '%' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 mod_boolean_vec() { return bool2(false, false) % bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 19: type mismatch: '<<' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 shl_boolean_vec() { return bool2(false, false) << bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 20: type mismatch: '>>' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 shr_boolean_vec() { return bool2(false, false) >> bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 21: '!' cannot operate on 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 not_boolean_vec() { return !bool2(false, false); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 22: '-' cannot operate on 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 neg_boolean_vec() { return -bool2(false, false); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 23: '~' cannot operate on 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 bitnot_boolean_vec() { return ~bool2(false, false); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 24: type mismatch: '&' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 bitand_boolean_vec() { return bool2(false, false) & bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 25: type mismatch: '|' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 bitor_boolean_vec() { return bool2(false, false) | bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
error: 26: type mismatch: '^' cannot operate on 'bool2', 'bool2'
|
2022-04-06 22:24:52 +00:00
|
|
|
bool2 bitxor_boolean_vec() { return bool2(false, false) ^ bool2(true, true); }
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-11-25 16:09:03 +00:00
|
|
|
25 errors
|