+2009-12-10 Marek Safar <marek.safar@gmail.com>
+
+ * ecore.cs: Ignore base imported methods when they are already
+ in method bag.
+
+ * eval.cs: Handle non-existent keys.
+
+ * report.cs, driver.cs: Make fatal work with console printer only.
+
2009-12-08 Rodrigo Kumpera <rkumpera@novell.com>
* typemanager.cs (MakeGenericMethod): Fix stupid mistake.
2009-12-08 Marek Safar <marek.safar@gmail.com>
A fix for bug #561149
- anonymous.cs: Use actual type parameters when checking for generic
+ * anonymous.cs: Use actual type parameters when checking for generic
method host.
2009-12-08 Marek Safar <marek.safar@gmail.com>
A fix for bug #561369
- expression.cs (DoNumericPromotion): Fixed typo.
+ * expression.cs (DoNumericPromotion): Fixed typo.
2009-12-08 Marek Safar <marek.safar@gmail.com>
bool want_debugging_support;
bool parse_only;
bool timestamps;
+ bool fatal_errors;
//
// Whether to load the initial config file (what CSC.RSP has by default)
public static int Main (string[] args)
{
Location.InEmacs = Environment.GetEnvironmentVariable ("EMACS") == "t";
-
- Driver d = Driver.Create (args, true, new ConsoleReportPrinter ());
+ var crp = new ConsoleReportPrinter ();
+ Driver d = Driver.Create (args, true, crp);
if (d == null)
return 1;
+ crp.Fatal = d.fatal_errors;
+
if (d.Compile () && d.Report.Errors == 0) {
if (d.Report.Warnings > 0) {
Console.WriteLine ("Compilation succeeded - {0} warning(s)", d.Report.Warnings);
return true;
case "--fatal":
- Report.Fatal = true;
+ fatal_errors = true;
return true;
case "--nowarn":
candidate_overrides = new List<MethodBase> ();
candidate_overrides.Add (m);
m = TypeManager.TryGetBaseDefinition (m);
+ if (m != null && Array.Exists (Methods, l => l == m))
+ continue;
}
if (m != null)
Methods [j++] = m;
static internal FieldInfo LookupField (string name)
{
- FieldInfo fi = (FieldInfo) fields [name];
+ FieldInfo fi;
+ if (!fields.TryGetValue (name, out fi))
+ return null;
return fi;
}
//
// Errors and warnings manager
//
- public class Report {
- /// <summary>
- /// Whether errors should be throw an exception
- /// </summary>
- public bool Fatal;
-
+ public class Report
+ {
/// <summary>
/// Whether warnings should be considered errors
/// </summary>
extra_information.Clear ();
printer.Print (msg);
-
- if (Fatal)
- throw new Exception (msg.Text);
}
public void Error (int code, Location loc, string format, string arg)
{
}
+ public bool Fatal { get; set; }
+
static int NameToCode (string s)
{
switch (s) {
if (Stacktrace)
Console.WriteLine (FriendlyStackTrace (new StackTrace (true)));
+
+ if (Fatal)
+ throw new Exception (msg.Text);
}
public static string FriendlyStackTrace (Exception e)