[svn] r6820: nemerle/trunk/ncc/typing: Typer-DelayedTyping.n Typer.n
VladD2
svnadmin at nemerle.org
Thu Nov 2 11:37:05 CET 2006
Log:
Fix error message display for "typing fails on ambiguity between overloads".
Author: VladD2
Date: Thu Nov 2 11:37:03 2006
New Revision: 6820
Modified:
nemerle/trunk/ncc/typing/Typer-DelayedTyping.n
nemerle/trunk/ncc/typing/Typer.n
Modified: nemerle/trunk/ncc/typing/Typer-DelayedTyping.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer-DelayedTyping.n (original)
+++ nemerle/trunk/ncc/typing/Typer-DelayedTyping.n Thu Nov 2 11:37:03 2006
@@ -303,16 +303,16 @@
}
- public GetDescriptionForError () : string
+ public GetDescriptionForError () : list [string]
{
match (DtKind) {
| Overloaded (overloads) =>
def used (o) { o.UsedLastTime }
- "ambiguity between overloads:\n " +
+ "ambiguity between overloads:" ::
(if (overloads.Exists (used))
overloads.Filter (used)
else
- overloads).ToString ("\n ")
+ overloads).Map (x => $"Posible overload: $x")
| Macro (action) =>
// the Resolve function should dump the error message
Util.locate (loc, {
@@ -322,9 +322,9 @@
"when run for the second time, the result is "
"$(Option.UnSome (res))");
});
- ToString ()
+ [ToString ()]
- | _ => ToString ()
+ | _ => [ToString ()]
}
}
Modified: nemerle/trunk/ncc/typing/Typer.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer.n (original)
+++ nemerle/trunk/ncc/typing/Typer.n Thu Nov 2 11:37:03 2006
@@ -385,10 +385,13 @@
});
assert (error_dt != null);
+ def errors = error_dt.GetDescriptionForError ();
Util.locate (error_dt.loc,
- ReportError (messenger,
- $ "typing fails on "
- "$(error_dt.GetDescriptionForError ())"))
+ ReportError (messenger, $"typing fails on $(errors.Head)"));
+
+ foreach (hint in errors.Tail)
+ Util.locate (error_dt.loc,
+ ReportError (messenger, hint));
}
}
#endregion
More information about the svn
mailing list