Return types are not matched with method return type.

RollingCat rollingcat at hotmail.com
Tue Jan 1 16:40:25 PST 2013


>> And it says that
>> this for ReturnMatchedFile needs to be type FileList not type
>> FileResult!(ReturnMatchedFile, DirIterator).
>> I can't understand it!
>>
>> Anyway, to solve the problem, again, I modified above code 
>> like below.
>>
>> static bool ReturnMatchedFile(string str_arg_filename)
>> {
>> return endsWith(str_arg_filename, ".d");
>> }
>>
>> class FileList
>> {
>> str_CurrentDir;
>>
>> void GetCurrentList()
>> {
>> auto
>> filter_CurrentList=filter!ReturnMatchedFile(dirEntries(str_CurrentDir,
>> SpanMode.shallow));
>> }
>> }
>>
>> and it works.
>>
>> What is the problem?
>>

Thanks for your reply. But what about the case of return type?

Regards.


More information about the Digitalmars-d-learn mailing list