Support nullable type narrowing for non-null flag
Now with --enable-experimental-non-null
:
void do_it (string? x) {
if (x != null) {
print(x);// Cannot convert from `string?' to `string'
}
}
What prevents convenient use of this flag. Also if works for ??
operator
void do_it (string? x) {
print(x ?? "null");
}
Edited by gavr