www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15614] New: more helpful error messages when bang omiitted


          Issue ID: 15614
           Summary: more helpful error messages when bang omiitted
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: laeeth laeeth.com

import std.stdio;
import std.string;
import std.process;
import std.algorithm;
import std.array:array;
import std.typecons:Tuple;
import std.file:exists;

enum whitelists=[       "/etc/mail/spamassassin/sent_whitelist.txt",
enum postgreyWhitelistPath="/etc/postfix/postgrey_whitelist_clients.local";

int main(string[] args)
        bool all=false;
        string result;

        return 0;

string extractDomain(string entry)
        return entry;

simple.d(22): Error: template std.algorithm.iteration.map cannot deduce
function from argument types !()(string[], void), candidates are:
std.algorithm.iteration.map(fun...) if (fun.length >= 1)

Perhaps we could check if it would compile if a ! were added to the parameters
and if so say "did you mean ...?"

Yes, one quickly gets used to it, but it's one more needless friction for
people learning the language.

Jan 26 2016