[Vala] Vala GIO sample remark



Hello, dear Community.

I'm looking at Vala GIO samples here:
http://live.gnome.org/Vala/GIOSamples

Don't you think that null-check like

var files = yield e.next_files_async (10, Priority.DEFAULT, null);
if (files == null) {
    break;
}

is redundant in "Asynchronous File Listing" example since the
"next_files_async" method signature is:

public virtual async List<FileInfo> next_files_async (int num_files, int io_priority, Cancellable? 
cancellable)

? Actually when --enable-experimental-non-null option is used it will
not compile - the return value isn't nullable and cannot be compared to
null.

Regards,
-- 
Alexander Semenov <bohtvaroh jabby org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]