// Author: Miguel de Icaza (miguel@ximian.com)
// Marek Safar (marek.safar@seznam.cz)
//
-// (C) 2001 Ximian, Inc. (http://www.ximian.com)
+// Copyright 2001 Ximian, Inc. (http://www.ximian.com)
//
using System;
2002, 2023, 2029,
3005, 3012, 3018, 3019, 3021, 3022, 3023, 3026, 3027,
#if GMCS_SOURCE
- 402, 414, 458, 693, 1058, 1700, 3024
+ 402, 414, 458, 464, 693, 1058, 1700, 3024
#endif
};
public static void EnableReporting ()
{
- if (warning_stack != null)
+ if (warning_stack != null && warning_stack.Count > 0)
Warnings = (int) warning_stack.Pop ();
+ else
+ Warnings = 0;
Errors = (int) error_stack.Pop ();
if (error_stack.Count == 0) {
public interface IMessageRecorder
{
+ bool IsEmpty { get; }
void EndSession ();
void AddMessage (AbstractMessage msg);
bool PrintMessages ();
session_messages.Add (msg);
}
+ public bool IsEmpty {
+ get {
+ return merged_messages == null && common_messages == null;
+ }
+ }
+
//
// Prints collected messages, common messages have a priority
//
Check (code);
}
- public virtual string ColorFormat (string s)
+ protected virtual string ColorFormat (string s)
{
return s;
}
{
}
- public override string ColorFormat (string s)
+ protected override string ColorFormat (string s)
{
if (prefix != null)
return prefix + s + postfix;
version = "2.0";
break;
case LanguageVersion.Default_MCS:
- Report.Error (1644, loc, "Feature `{0}' is not available in Mono mcs compiler. Consider using Mono gmcs compiler instead",
+ Report.Error (1644, loc, "Feature `{0}' is not available in Mono mcs1 compiler. Consider using the `gmcs' compiler instead",
feature);
return;
default:
if (type is TypeBuilder) {
DeclSpace temp_ds = TypeManager.LookupDeclSpace (type);
SymbolRelatedToPreviousError (temp_ds.Location, TypeManager.CSharpName (type));
- } else if (type.HasElementType) {
+ } else if (TypeManager.HasElementType (type)) {
SymbolRelatedToPreviousError (type.GetElementType ());
} else {
SymbolRelatedToPreviousError (type.Assembly.Location, TypeManager.CSharpName (type));