diff --git a/mcs/errors/cs0138.cs b/mcs/errors/cs0138.cs index 4d1632b60cb8e..382a4e670c8bb 100644 --- a/mcs/errors/cs0138.cs +++ b/mcs/errors/cs0138.cs @@ -1,4 +1,4 @@ -// cs0138.cs: `System.Console is a type not a namespace. A using namespace directive can only be applied to namespaces +// CS0138: `System.Console' is a type not a namespace. A using namespace directive can only be applied to namespaces // Line: 5 using System; diff --git a/mcs/errors/cs0652-2.cs b/mcs/errors/cs0652-2.cs index d804717ac27a9..be9d3757677dd 100644 --- a/mcs/errors/cs0652-2.cs +++ b/mcs/errors/cs0652-2.cs @@ -1,6 +1,7 @@ -// cs0652-2.cs : Comparison to integral constant is useless; the constant is outside the range of type `byte' -// Line: 11 +// CS0652: A comparison between a constant and a variable is useless. The constant is out of the range of the variable type `byte' +// Line: 12 // Compiler options: /warn:2 /warnaserror + using System; public class CS0652 { diff --git a/mcs/errors/cs0652-3.cs b/mcs/errors/cs0652-3.cs index 8802fdc623a62..18c093ec1cf20 100644 --- a/mcs/errors/cs0652-3.cs +++ b/mcs/errors/cs0652-3.cs @@ -1,4 +1,4 @@ -// cs0652-3.cs : Comparison to integral constant is useless; the constant is outside the range of type `ushort' +// CS0652: A comparison between a constant and a variable is useless. The constant is out of the range of the variable type `ushort' // Line: 11 // Compiler options: /warn:2 /warnaserror using System; diff --git a/mcs/errors/cs0652-4.cs b/mcs/errors/cs0652-4.cs index 44e70339ce11f..0528edd166470 100644 --- a/mcs/errors/cs0652-4.cs +++ b/mcs/errors/cs0652-4.cs @@ -1,4 +1,4 @@ -// cs0652-4.cs : Comparison to integral constant is useless; the constant is outside the range of type `short' +// CS0652: A comparison between a constant and a variable is useless. The constant is out of the range of the variable type `short' // Line: 11 // Compiler options: /warn:2 /warnaserror using System; diff --git a/mcs/errors/cs0652-5.cs b/mcs/errors/cs0652-5.cs new file mode 100644 index 0000000000000..e7827ef6d2b66 --- /dev/null +++ b/mcs/errors/cs0652-5.cs @@ -0,0 +1,16 @@ +// CS0652: A comparison between a constant and a variable is useless. The constant is out of the range of the variable type `char' +// Line: 12 +// Compiler options: /warn:2 /warnaserror + +using System; + +public class CS0652 { + + public static void Main () + { + char value = 'a'; + if (value < SByte.MinValue) + return; + } +} + diff --git a/mcs/errors/cs0652-6.cs b/mcs/errors/cs0652-6.cs new file mode 100644 index 0000000000000..e927176091501 --- /dev/null +++ b/mcs/errors/cs0652-6.cs @@ -0,0 +1,16 @@ +// CS0652: A comparison between a constant and a variable is useless. The constant is out of the range of the variable type `short' +// Line: 12 +// Compiler options: /warn:2 /warnaserror + +using System; + +public class CS0652 { + + public static void Main () + { + short value = 5; + if (value > char.MaxValue) + return; + } +} + diff --git a/mcs/errors/cs0652-7.cs b/mcs/errors/cs0652-7.cs new file mode 100644 index 0000000000000..ec08b5f7815fe --- /dev/null +++ b/mcs/errors/cs0652-7.cs @@ -0,0 +1,16 @@ +// CS0652: A comparison between a constant and a variable is useless. The constant is out of the range of the variable type `char' +// Line: 12 +// Compiler options: /warn:2 /warnaserror + +using System; + +public class CS0652 { + + public static void Main () + { + char value = 'a'; + if (value > ulong.MaxValue) + return; + } +} + diff --git a/mcs/errors/cs0652.cs b/mcs/errors/cs0652.cs index 8d42558e52b92..b555d45a01d8f 100644 --- a/mcs/errors/cs0652.cs +++ b/mcs/errors/cs0652.cs @@ -1,4 +1,4 @@ -// cs0652.cs: Comparison to integral constant is useless; the constant is outside the range of type `byte' +// CS0652: A comparison between a constant and a variable is useless. The constant is out of the range of the variable type `byte' // Line: 9 // Compiler options: -warnaserror -warn:2 diff --git a/mcs/errors/cs1718.cs b/mcs/errors/cs1718.cs index 0f585a0a54a4e..0e9299c465338 100644 --- a/mcs/errors/cs1718.cs +++ b/mcs/errors/cs1718.cs @@ -1,4 +1,4 @@ -// cs1718.cs: Comparison made to same variable; did you mean to compare something else? +// CS1718: A comparison made to same variable. Did you mean to compare something else? // Line: 10 // Compiler options: -warnaserror -warn:3