Vala does not support preconditions with `in` syntax
Gee.ArrayList<string> list;
void method (string arg1) requires (arg1 in list) {
// something here
}
When trying to compile the snippet from above, valac
throws this at the output:
(valac:365178): vala-CRITICAL **: 15:59:16.294: vala_data_type_compatible: assertion 'self != NULL' failed
program.vala:3.37-3.48: error: Precondition must be boolean
void method (string arg1) requires (arg1 in list) {
^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
Vala version: 0.54.3
OS: Fedora Linux 35 (Container Image) x86_64