X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Freport.cs;h=74bbb46c640cf42053a1d096fd4472a61804934b;hb=519043400473f298a823ea3da52ef1851cc0cd2e;hp=bfb82fb9f30f7e72fd259e526f5be2f0d1538288;hpb=5fbc1cd095d81ec77d8e5b66751b174d2870fe0f;p=mono.git diff --git a/mcs/mcs/report.cs b/mcs/mcs/report.cs index bfb82fb9f30..74bbb46c640 100644 --- a/mcs/mcs/report.cs +++ b/mcs/mcs/report.cs @@ -56,7 +56,9 @@ namespace Mono.CSharp { 3000, 3001, 3002, 3003, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3021, 3022, 3023, 3024, 3026, 3027, - 4014 + 4014, 4024, 4025, 4026, + 7035, 7080, 7081, 7082, 7095, + 8009, 8094 }; static HashSet AllWarningsHashSet; @@ -101,6 +103,9 @@ namespace Mono.CSharp { case LanguageVersion.V_5: version = "5.0"; break; + case LanguageVersion.V_6: + version = "6.0"; + break; default: throw new InternalErrorException ("Invalid feature version", compiler.Settings.Version); } @@ -550,6 +555,8 @@ namespace Mono.CSharp { // public abstract class ReportPrinter { + protected HashSet reported_missing_definitions; + #region Properties public int ErrorsCount { get; protected set; } @@ -605,6 +612,22 @@ namespace Mono.CSharp { } } + // + // Tracks reported missing types. It needs to be session specific + // because we can run in probing mode + // + public bool MissingTypeReported (ITypeDefinition typeDefinition) + { + if (reported_missing_definitions == null) + reported_missing_definitions = new HashSet (); + + if (reported_missing_definitions.Contains (typeDefinition)) + return true; + + reported_missing_definitions.Add (typeDefinition); + return false; + } + public void Reset () { // HACK: Temporary hack for broken repl flow @@ -735,6 +758,11 @@ namespace Mono.CSharp { error_msg |= !msg.IsWarning; } + if (reported_missing_definitions != null) { + foreach (var missing in reported_missing_definitions) + dest.MissingTypeReported (missing); + } + return error_msg; } } @@ -931,7 +959,7 @@ namespace Mono.CSharp { if (timers == null) return; - Dictionary timer_names = new Dictionary () { + Dictionary timer_names = new Dictionary { { TimerType.ParseTotal, "Parsing source files" }, { TimerType.AssemblyBuilderSetup, "Assembly builder setup" }, { TimerType.CreateTypeTotal, "Compiled types created" }, @@ -1030,7 +1058,7 @@ namespace Mono.CSharp { public override bool IsEnabled (int code, bool previous) { - return this.code == code ? false : previous; + return this.code != code && previous; } } @@ -1056,7 +1084,7 @@ namespace Mono.CSharp { public override bool IsEnabled(int code, bool previous) { - return this.code == code ? true : previous; + return this.code == code || previous; } }