diff dmd/template.c @ 1640:9bf06e02070b

Merge DMD 1.057.
author Christian Kamm <kamm incasoftware de>
date Mon, 08 Mar 2010 21:39:20 +0100
parents 44b145be2ef5
children
line wrap: on
line diff
--- a/dmd/template.c	Mon Mar 08 20:09:18 2010 +0100
+++ b/dmd/template.c	Mon Mar 08 21:39:20 2010 +0100
@@ -3701,7 +3701,12 @@
 	id = name;
 	s = sc->search(loc, id, &scopesym);
 	if (!s)
-	{   error("template '%s' is not defined", id->toChars());
+	{
+	    s = sc->search_correct(id);
+	    if (s)
+		error("template '%s' is not defined, did you mean %s?", id->toChars(), s->toChars());
+	    else
+		error("template '%s' is not defined", id->toChars());
 	    return NULL;
 	}
 #if LOG