From: Marek Safar Date: Tue, 27 Apr 2010 08:40:02 +0000 (-0000) Subject: Flush (work in progress) X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=0900c61969ca862b0bcc967b4413e539acf07dbb;hp=-c;p=mono.git Flush (work in progress) svn path=/trunk/mcs/; revision=156168 --- 0900c61969ca862b0bcc967b4413e539acf07dbb diff --combined mcs/errors/Makefile index 105862568c6,605731dd506..33b20aaf52b --- a/mcs/errors/Makefile +++ b/mcs/errors/Makefile @@@ -35,10 -35,10 +35,10 @@@ TEST_SUPPORT_FILES = # mention all targets all-local $(STD_TARGETS:=-local): -VALID_PROFILE := $(filter net_2_0 net_2_1 net_4_0, $(PROFILE)) +VALID_PROFILE := $(filter net_2_0 moonlight net_4_0, $(PROFILE)) ifdef VALID_PROFILE --check: run-mcs-tests ++qcheck: run-mcs-tests # again, run-test is when the tests actually happen, so # don't compile on make test. @@@ -53,7 -53,7 +53,7 @@@ ifeq (net_4_0, $(PROFILE) COMPILER_NAME = dmcs TEST_PATTERN = 'v4' endif -ifeq (net_2_1, $(PROFILE)) +ifeq (moonlight, $(PROFILE)) COMPILER_NAME = smcs TEST_PATTERN = 'v2' LOCAL_RUNTIME_FLAGS = --security=temporary-smcs-hack @@@ -72,9 -72,9 +72,6 @@@ TESTER_OPTIONS +=-compiler-options:- run-mcs-tests: $(TEST_SUPPORT_FILES) $(TESTER) -mode:neg -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TESTER_OPTIONS) --cecil: -- $(TESTER) -mode:neg -files:$(TEST_PATTERN) -compiler:../tests/gmcs.exe -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TESTER_OPTIONS) -verbose -- endif clean-local: diff --combined mcs/errors/cs0111-3.cs index 00000000000,00000000000..98e80033a5a new file mode 100644 --- /dev/null +++ b/mcs/errors/cs0111-3.cs @@@ -1,0 -1,0 +1,17 @@@ ++// CS0111: ++// Line: 8 ++ ++using System; ++ ++class Test {} ++ ++namespace Test ++{ ++ public class Foo ++ { ++ public static void Main () ++ { ++ Test t = new Test (); ++ } ++ } ++} diff --combined mcs/errors/cs0117-2.cs index 79df8d4ac1f,79df8d4ac1f..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/cs0117-2.cs +++ /dev/null @@@ -1,22 -1,22 +1,0 @@@ --// cs0117-2.cs: `A' does not contain a definition for `Foo' --// Line: 15 --using System; --using System.Runtime.CompilerServices; -- --class A --{ -- [IndexerName ("Foo")] -- public int this [int index] { -- get { return index; } -- } -- -- static int Test (A a) -- { -- return a.Foo; -- } -- -- public static void Main () -- { -- Test (new A ()); -- } --} diff --combined mcs/errors/cs0117-3.cs index f486cf0d795,f486cf0d795..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/cs0117-3.cs +++ /dev/null @@@ -1,23 -1,23 +1,0 @@@ --// cs0117-3.cs: `A' does not contain a definition for `Foo' --// Line: 16 --using System; --using System.Runtime.CompilerServices; -- --class A --{ -- [IndexerName ("Foo")] -- public int this [int index] { -- get { return index; } -- set { ; } -- } -- -- static void Test (A a, int value) -- { -- a.Foo = value; -- } -- -- public static void Main () -- { -- Test (new A (), 9); -- } --} diff --combined mcs/errors/cs0121-10.cs index 00000000000,00000000000..37fd0245ae5 new file mode 100644 --- /dev/null +++ b/mcs/errors/cs0121-10.cs @@@ -1,0 -1,0 +1,35 @@@ ++// CS0121: The call is ambiguous between the following methods or properties: `IList.Count()' and `ICounter.Count()' ++// Line: 33 ++ ++using System; ++ ++interface IList ++{ ++ int Count (); ++} ++ ++interface ICounter ++{ ++ int Count (); ++} ++ ++interface ICollection ++{ ++ int Count { set; } ++} ++ ++interface IListCounter: IList, ICounter, ICollection ++{ ++} ++ ++interface IListCounterNew : IListCounter ++{ ++} ++ ++class Test ++{ ++ static void Foo (IListCounterNew t) ++ { ++ t.Count (); ++ } ++} diff --combined mcs/errors/cs0121-3.cs index 0ecedd64a51,0ecedd64a51..ae264ead0d4 --- a/mcs/errors/cs0121-3.cs +++ b/mcs/errors/cs0121-3.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0121: The call is ambiguous between the following methods or properties: `B.operator +(A, B)' and `A.operator +(A, B)' ++// CS0121: The call is ambiguous between the following methods or properties: `A.operator +(A, B)' and `B.operator +(A, B)' // Line: 21 class A diff --combined mcs/errors/cs0121-5.cs index 77187f76664,77187f76664..901639beea4 --- a/mcs/errors/cs0121-5.cs +++ b/mcs/errors/cs0121-5.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0121: The call is ambiguous between the following methods or properties: `V3.operator -(V3, V3)' and `V2.operator -(V2, V2)' ++// CS0121: The call is ambiguous between the following methods or properties: `V2.operator -(V2, V2)' and `V3.operator -(V3, V3)' // Line: 45 public struct V3 diff --combined mcs/errors/cs0121-9.cs index 00000000000,00000000000..68303d38396 new file mode 100644 --- /dev/null +++ b/mcs/errors/cs0121-9.cs @@@ -1,0 -1,0 +1,31 @@@ ++// CS0121: The call is ambiguous between the following methods or properties: `IList.Count()' and `ICounter.Count()' ++// Line: 29 ++ ++using System; ++ ++interface IList ++{ ++ int Count (); ++} ++ ++interface ICounter ++{ ++ int Count (); ++} ++ ++interface ICollection ++{ ++ int Count { set; } ++} ++ ++interface IListCounter: IList, ICounter, ICollection ++{ ++} ++ ++class Test ++{ ++ static void Foo (IListCounter t) ++ { ++ t.Count (); ++ } ++} diff --combined mcs/errors/cs0122-27.cs index 778b352c8d3,778b352c8d3..873ea55e9cb --- a/mcs/errors/cs0122-27.cs +++ b/mcs/errors/cs0122-27.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0122: `G.GG.F' is inaccessible due to its protection level ++// CS0122: `G.GG' is inaccessible due to its protection level // Line: 14 class G diff --combined mcs/errors/cs0146-3.cs index eb5316f101e,eb5316f101e..f400b56faef --- a/mcs/errors/cs0146-3.cs +++ b/mcs/errors/cs0146-3.cs @@@ -1,4 -1,4 +1,4 @@@ --// cs0146-3.cs: Circular base class dependency involving `Foo.Bar' and `Foo' ++// CS0146: Circular base class dependency involving `Foo' and `Foo.Bar' // Line: 5 class Foo : Foo.Bar { diff --combined mcs/errors/cs0146-4.cs index a9ef8378383,a9ef8378383..2e52d9c4ddf --- a/mcs/errors/cs0146-4.cs +++ b/mcs/errors/cs0146-4.cs @@@ -1,4 -1,4 +1,4 @@@ --// cs0146-4.cs: Circular base class dependency involving `Foo.Bar' and `Foo' ++// CS0146: Circular base class dependency involving `Baz' and `Foo.Bar' // Line: 5 class Foo : Baz { diff --combined mcs/errors/cs0278.cs index fb6bc5b6bc9,fb6bc5b6bc9..cf21792116b --- a/mcs/errors/cs0278.cs +++ b/mcs/errors/cs0278.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0278: `Testing.IMixedEnumerable' contains ambiguous implementation of `enumerable' pattern. Method `Testing.ICustomEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.IEnumerable.GetEnumerator()' ++// CS0278: `Testing.IMixedEnumerable' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `Testing.ICustomEnumerable.GetEnumerator()' // Line: 28 // Compiler options: -warnaserror -warn:2 @@@ -28,4 -28,4 +28,4 @@@ namespace Testing foreach(object o in c) {} } } --} ++} diff --combined mcs/errors/cs0419-2.cs index 3651a6db676,3651a6db676..982895b3912 --- a/mcs/errors/cs0419-2.cs +++ b/mcs/errors/cs0419-2.cs @@@ -1,4 -1,4 +1,4 @@@ --// cs0419-2.cs: Ambiguous reference in cref attribute `A.this'. Assuming `Test.A.this[string]' but other overloads including `Test.A.this[int]' have also matched ++// CS0419: Ambiguous reference in cref attribute `A.this'. Assuming `Test.A.this[int]' but other overloads including `Test.A.this[string]' have also matched // Line: 7 // Compiler options: -doc:dummy.xml -warnaserror using System.Collections; diff --combined mcs/errors/cs0436.cs index 34874f65934,34874f65934..f3272f6c8fc --- a/mcs/errors/cs0436.cs +++ b/mcs/errors/cs0436.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0436: The type `System.Console' conflicts with the imported type `System.Console'. Ignoring the imported type definition ++// CS0436: The type `System.Console' conflicts with the imported type of same name'. Ignoring the imported type definition // Line: 16 // Compiler options: -warn:2 -warnaserror diff --combined mcs/errors/cs0467-2.cs index 4336a368da4,4336a368da4..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/cs0467-2.cs +++ /dev/null @@@ -1,32 -1,32 +1,0 @@@ --// cs0467-2.cs: Ambiguity between method `ICounter.Count()' and non-method `ICollection.Count'. Using method `ICounter.Count()' --// Line: 30 --// Compiler options: -warnaserror -warn:2 -- --using System; -- --interface IList --{ -- int Count (); --} -- --interface ICounter --{ -- int Count (); --} -- --interface ICollection --{ -- int Count { set; } --} -- --interface IListCounter: IList, ICounter, ICollection --{ --} -- --class Test --{ -- static void Foo (IListCounter t) -- { -- t.Count (); -- } --} diff --combined mcs/errors/cs0467-3.cs index 2a2875b28fe,2a2875b28fe..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/cs0467-3.cs +++ /dev/null @@@ -1,36 -1,36 +1,0 @@@ --// cs0467-3.cs: Ambiguity between method `ICounter.Count()' and non-method `ICollection.Count'. Using method `ICounter.Count()' --// Line: 34 --// Compiler options: -warnaserror -warn:2 -- --using System; -- --interface IList --{ -- int Count (); --} -- --interface ICounter --{ -- int Count (); --} -- --interface ICollection --{ -- int Count { set; } --} -- --interface IListCounter: IList, ICounter, ICollection --{ --} -- --interface IListCounterNew : IListCounter --{ --} -- --class Test --{ -- static void Foo (IListCounterNew t) -- { -- t.Count (); -- } --} diff --combined mcs/errors/cs0467.cs index 86acc2e34ad,86acc2e34ad..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/cs0467.cs +++ /dev/null @@@ -1,32 -1,32 +1,0 @@@ --// cs0467.cs: Ambiguity between method `ICounter.Count(int)' and non-method `IList.Count'. Using method `ICounter.Count(int)' --// Line: 30 --// Compiler options: -warnaserror -warn:2 -- --using System; -- --interface IList --{ -- int Count { get; set; } --} -- --interface ICounter --{ -- void Count (int i); --} -- --interface IEx --{ -- void Count (params int[] i); --} -- --interface IListCounter: IEx, IList, ICounter --{ --} -- --class Test --{ -- static void Foo (IListCounter t) -- { -- t.Count (1); -- } --} diff --combined mcs/errors/cs0507-6.cs index 00000000000,00000000000..49739417c74 new file mode 100644 --- /dev/null +++ b/mcs/errors/cs0507-6.cs @@@ -1,0 -1,0 +1,17 @@@ ++// CS0507: `DerivedClass.Message': cannot change access modifiers when overriding `public' inherited member `BaseClass.Message' ++// Line: 12 ++ ++class BaseClass { ++ public virtual string Message { ++ set { ++ } ++ } ++} ++ ++class DerivedClass : BaseClass { ++ protected override string Message { ++ set { ++ } ++ } ++} ++ diff --combined mcs/errors/cs0527-2.cs index 89a41cf9efc,89a41cf9efc..b89e498c6af --- a/mcs/errors/cs0527-2.cs +++ b/mcs/errors/cs0527-2.cs @@@ -1,8 -1,8 +1,8 @@@ --// cs0527-2.cs: Type `A' in interface list is not an interface --// Line: 7 ++// CS0527: Type `B' in interface list is not an interface ++// Line: 4 struct A : B { } struct B : A { --} ++} diff --combined mcs/errors/cs0529.cs index 03bc988d5b3,03bc988d5b3..25a7de82f7a --- a/mcs/errors/cs0529.cs +++ b/mcs/errors/cs0529.cs @@@ -1,4 -1,4 +1,4 @@@ --// cs0529.cs: Inherited interface `A' causes a cycle in the interface hierarchy of `C' ++// CS0529: Inherited interface `C' causes a cycle in the interface hierarchy of `A' // Line: 10 interface A : B { @@@ -8,4 -8,4 +8,4 @@@ interface B : C } interface C : A { --} ++} diff --combined mcs/errors/cs0533-5.cs index 00000000000,00000000000..4c395dbd434 new file mode 100644 --- /dev/null +++ b/mcs/errors/cs0533-5.cs @@@ -1,0 -1,0 +1,13 @@@ ++// CS0533: `DerivedClass.Foo' hides inherited abstract member `BaseClass.Foo()' ++// Line: 11 ++ ++abstract public class BaseClass ++{ ++ abstract protected void Foo (); ++} ++ ++abstract class DerivedClass: BaseClass ++{ ++ public new int Foo; ++} ++ diff --combined mcs/errors/cs0619-41.cs index 2527e65295d,2527e65295d..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/cs0619-41.cs +++ /dev/null @@@ -1,28 -1,28 +1,0 @@@ --// cs0619-41.cs: `A.Filename' is obsolete: `Obsolete' --// Line: 8 -- --class A: Error { -- [System.ObsoleteAttribute ("Obsolete", true)] -- public override string Filename { -- set { -- } -- } -- -- public static void Main () {} --} -- --public class Error { -- public virtual string Filename { -- set { -- } -- get { -- return "aa"; -- } -- } --} -- --class B { -- void TT () { -- new A ().Filename = "Filename"; -- } --} diff --combined mcs/errors/cs0683.cs index f3429d633a3,f3429d633a3..0fc25711f6c --- a/mcs/errors/cs0683.cs +++ b/mcs/errors/cs0683.cs @@@ -1,4 -1,4 +1,4 @@@ --// cs0683.cs: `C.I.set_Foo(int)' explicit method implementation cannot implement `I.Foo' because it is an accessor ++// CS0683: `C.I.set_Foo(int)' explicit method implementation cannot implement `I.Foo.set' because it is an accessor // Line: 11 interface I diff --combined mcs/errors/cs0738-2.cs index d9866e889a4,d9866e889a4..9a71e692257 --- a/mcs/errors/cs0738-2.cs +++ b/mcs/errors/cs0738-2.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0738: `C' does not implement interface member `I2.Key.get' and the best implementing candidate `C.Key' return type `IB' does not match interface member return type `IA' ++// CS0738: `C' does not implement interface member `I2.Key.get' and the best implementing candidate `C.Key.get' return type `IB' does not match interface member return type `IA' // Line: 22 public interface I1 diff --combined mcs/errors/cs0809-2.cs index 00000000000,00000000000..ef6793f34ef new file mode 100644 --- /dev/null +++ b/mcs/errors/cs0809-2.cs @@@ -1,0 -1,0 +1,29 @@@ ++// CS0809: Obsolete member `A.Filename' overrides non-obsolete member `Error.Filename' ++// Line: 8 ++// Compiler options: -warnaserror ++ ++class A: Error { ++ [System.ObsoleteAttribute ("Obsolete", true)] ++ public override string Filename { ++ set { ++ } ++ } ++ ++ public static void Main () {} ++} ++ ++public class Error { ++ public virtual string Filename { ++ set { ++ } ++ get { ++ return "aa"; ++ } ++ } ++} ++ ++class B { ++ void TT () { ++ new A ().Filename = "Filename"; ++ } ++} diff --combined mcs/errors/cs1061-2.cs index 00000000000,00000000000..f7efaf5a7f0 new file mode 100644 --- /dev/null +++ b/mcs/errors/cs1061-2.cs @@@ -1,0 -1,0 +1,24 @@@ ++// CS1061: Type `A' does not contain a definition for `Foo' and no extension method `Foo' of type `A' could be found (are you missing a using directive or an assembly reference?) ++// Line: 17 ++ ++using System; ++using System.Runtime.CompilerServices; ++ ++class A ++{ ++ [IndexerName ("Foo")] ++ public int this [int index] { ++ get { return index; } ++ set { ; } ++ } ++ ++ static void Test (A a, int value) ++ { ++ a.Foo = value; ++ } ++ ++ public static void Main () ++ { ++ Test (new A (), 9); ++ } ++} diff --combined mcs/errors/cs1061.cs index 00000000000,00000000000..e95697181aa new file mode 100644 --- /dev/null +++ b/mcs/errors/cs1061.cs @@@ -1,0 -1,0 +1,23 @@@ ++// CS1061: Type `A' does not contain a definition for `Foo' and no extension method `Foo' of type `A' could be found (are you missing a using directive or an assembly reference?) ++// Line: 16 ++ ++using System; ++using System.Runtime.CompilerServices; ++ ++class A ++{ ++ [IndexerName ("Foo")] ++ public int this [int index] { ++ get { return index; } ++ } ++ ++ static int Test (A a) ++ { ++ return a.Foo; ++ } ++ ++ public static void Main () ++ { ++ Test (new A ()); ++ } ++} diff --combined mcs/errors/cs1546.cs index 77fa101e030,77fa101e030..92cd9ec256c --- a/mcs/errors/cs1546.cs +++ b/mcs/errors/cs1546.cs @@@ -1,4 -1,4 +1,4 @@@ --// cs1546.cs: Property `Title' is not supported by the C# language. Try to call the accessor method `Test.ITopic.get_Title(int, int)' directly ++// CS1546: Property or event `Test.ITopic.Title' is not supported by the C# language // Line: 9 // Compiler options: -r:CS1546-lib.dll diff --combined mcs/errors/cs1685.cs index 7a675e50159,7a675e50159..97ad1e24224 --- a/mcs/errors/cs1685.cs +++ b/mcs/errors/cs1685.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS1685: The predefined type `System.Int32' is ambiguous. Using definition from `mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' ++// CS1685: The predefined type `System.Int32' is redefined in the source code. Ignoring the local type definition // Line: 6 // Compiler options: -warn:1 -warnaserror diff --combined mcs/errors/cs1739-2.cs index bcf6c180229,bcf6c180229..13328629b4c --- a/mcs/errors/cs1739-2.cs +++ b/mcs/errors/cs1739-2.cs @@@ -1,6 -1,6 +1,5 @@@ --// CS1739: The best overloaded method match for `A.this[int]' does not contain a parameter named `value' ++// CS1739: The best overloaded method match for `A.this[int].set' does not contain a parameter named `value' // Line: 17 --// Compiler options: -langversion:future class A { diff --combined mcs/errors/cs3005-2.cs index 009174e071b,009174e071b..22dc088b25a --- a/mcs/errors/cs3005-2.cs +++ b/mcs/errors/cs3005-2.cs @@@ -1,4 -1,4 +1,4 @@@ --// cs3005-2.cs: Identifier `CLSClass.Index' differing only in case is not CLS-compliant ++// CS3005: Identifier `CLSClass.Index.get' differing only in case is not CLS-compliant // Line: 14 // Compiler options: -warnaserror diff --combined mcs/errors/cs3005-20.cs index d75aebcdf2d,d75aebcdf2d..475ab99c279 --- a/mcs/errors/cs3005-20.cs +++ b/mcs/errors/cs3005-20.cs @@@ -1,5 -1,5 +1,5 @@@ --// CS3005: Identifier `I.this[int]' differing only in case is not CLS-compliant --// Line: 12 ++// CS3005: Identifier `I.BLAH.get' differing only in case is not CLS-compliant ++// Line: 16 // Compiler options: -warnaserror using System.Runtime.CompilerServices; diff --combined mcs/errors/gcs0108.cs index 848f0c749e0,848f0c749e0..c5415412b6b --- a/mcs/errors/gcs0108.cs +++ b/mcs/errors/gcs0108.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0108: `BaseConcrete.InnerDerived()' hides inherited member `BaseGeneric.InnerDerived'. Use the new keyword if hiding was intended ++// CS0108: `BaseConcrete.InnerDerived()' hides inherited member `BaseGeneric.InnerDerived'. Use the new keyword if hiding was intended // Line: 14 // Compiler options: -warn:2 -warnaserror diff --combined mcs/errors/gcs0122-2.cs index 0f545622818,0f545622818..7a4df8bb822 --- a/mcs/errors/gcs0122-2.cs +++ b/mcs/errors/gcs0122-2.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0122: `Test' is inaccessible due to its protection level ++// CS0122: `Test' is inaccessible due to its protection level // Line: 8 // Compiler options: -r:GCS0122-2-lib.dll diff --combined mcs/errors/gcs0146.cs index 4c64ef6e732,4c64ef6e732..0a164dba475 --- a/mcs/errors/gcs0146.cs +++ b/mcs/errors/gcs0146.cs @@@ -1,4 -1,4 +1,4 @@@ --// gcs0146.cs: Circular base class dependency involving `B' and `A' ++// CS0146: Circular base class dependency involving `B' and `A' // Line: 8 class A : B diff --combined mcs/errors/gcs0246-2.cs index f5ce9f7c099,f5ce9f7c099..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs0246-2.cs +++ /dev/null @@@ -1,9 -1,9 +1,0 @@@ --// gcs0246.cs: The type or namespace name `List`2' could not be found. Are you missing a using directive or an assembly reference? --// Line: 8 -- --using System.Collections.Generic; -- --class X --{ -- List list; --} diff --combined mcs/errors/gcs0246-5.cs index 00000000000,00000000000..1050967f969 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0246-5.cs @@@ -1,0 -1,0 +1,7 @@@ ++// CS0246: The type or namespace name `X' could not be found. Are you missing a using directive or an assembly reference? ++// Line: 4 ++ ++class A where T : X ++{ ++ public class X {} ++} diff --combined mcs/errors/gcs0246-6.cs index 00000000000,00000000000..5411c541d01 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0246-6.cs @@@ -1,0 -1,0 +1,18 @@@ ++// CS0246: The type or namespace name `M' could not be found. Are you missing a using directive or an assembly reference? ++// Line: 11 ++ ++interface I ++{ ++ void G (); ++} ++ ++class C ++{ ++ void I.G () ++ { ++ } ++ ++ public static void Main () ++ { ++ } ++} diff --combined mcs/errors/gcs0246.cs index c9353f17110,c9353f17110..775a3daa957 --- a/mcs/errors/gcs0246.cs +++ b/mcs/errors/gcs0246.cs @@@ -1,4 -1,4 +1,4 @@@ --// gcs0246.cs: The type or namespace name `NotExist`1' could not be found. Are you missing a using directive or an assembly reference? ++// CS0246: The type or namespace name `NotExist' could not be found. Are you missing a using directive or an assembly reference? // Line: 6 class X diff --combined mcs/errors/gcs0304.cs index d9f3591c16c,d9f3591c16c..2760b2ca53d --- a/mcs/errors/gcs0304.cs +++ b/mcs/errors/gcs0304.cs @@@ -1,5 -1,5 +1,5 @@@ --// CS0304: Cannot create an instance of the variable type 'T' because it doesn't have the new() constraint --// Line: 9 ++// CS0304: Cannot create an instance of the variable type `T' because it does not have the new() constraint ++// Line: 8 public class Foo { diff --combined mcs/errors/gcs0305-6.cs index 00000000000,00000000000..8e37f48c091 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0305-6.cs @@@ -1,0 -1,0 +1,9 @@@ ++// CS0305: Using the generic type `System.Collections.Generic.List' requires `1' type argument(s) ++// Line: 8 ++ ++using System.Collections.Generic; ++ ++class X ++{ ++ List list; ++} diff --combined mcs/errors/gcs0309-2.cs index 6411c3d4227,6411c3d4227..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs0309-2.cs +++ /dev/null @@@ -1,25 -1,25 +1,0 @@@ --// CS0309: The type `B' must be convertible to `I' in order to use it as parameter `T' in the generic type or method `Foo' --// Line: 21 -- --public class Foo -- where T : A, I --{ --} -- --public interface I --{ } -- --public class A --{ } -- --public class B : A --{ } -- --class X --{ -- Foo foo; -- -- static void Main () -- { -- } --} diff --combined mcs/errors/gcs0309-3.cs index 7aae4e320a6,7aae4e320a6..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs0309-3.cs +++ /dev/null @@@ -1,39 -1,39 +1,0 @@@ --// CS0309: The type `B' must be convertible to `A' in order to use it as parameter `T' in the generic type or method `Foo' --// Line: 35 --using System; -- --public class Foo -- where T : A --{ -- public void Test (T t) -- { -- Console.WriteLine (t); -- Console.WriteLine (t.GetType ()); -- t.Hello (); -- } --} -- --public class A --{ -- public void Hello () -- { -- Console.WriteLine ("Hello World"); -- } --} -- --public class B --{ -- public static implicit operator A (B b) -- { -- return new A (); -- } --} -- --class X --{ -- Foo b; -- -- static void Main () -- { -- } --} diff --combined mcs/errors/gcs0309-4.cs index 6606028ada2,6606028ada2..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs0309-4.cs +++ /dev/null @@@ -1,21 -1,21 +1,0 @@@ -- // gcs0309.cs: The type `U' must be convertible to `System.IComparable' in order to use it as parameter `T' in the generic type or method `A' --// Line: 13 -- --using System; -- --class A -- where T: IComparable --{ --} -- --class B -- where V: A --{ --} -- --class Driver --{ -- public static void Main () -- { -- } --} diff --combined mcs/errors/gcs0309-5.cs index 96100ee2d92,96100ee2d92..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs0309-5.cs +++ /dev/null @@@ -1,9 -1,9 +1,0 @@@ --// CS0309: The type `int' must be convertible to `System.EventArgs' in order to use it as parameter `TEventArgs' in the generic type or method `System.EventHandler' --// Line: 5 -- --class X { -- System.EventHandler x; -- static void Main () {} --} -- -- diff --combined mcs/errors/gcs0309-6.cs index 2b932584751,2b932584751..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs0309-6.cs +++ /dev/null @@@ -1,6 -1,6 +1,0 @@@ --// CS0309: The type `B' must be convertible to `D>' in order to use it as parameter `X' in the generic type or method `C' --// Line: 3 --class A : C> {} --class B {} --interface C where X : D {} --interface D {} diff --combined mcs/errors/gcs0309-7.cs index 9dd3a0d5955,9dd3a0d5955..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs0309-7.cs +++ /dev/null @@@ -1,30 -1,30 +1,0 @@@ --// CS0309: The type `T' must be convertible to `System.IDisposable' in order to use it as parameter `T' in the generic type or method `IB' --// Line: 20 -- --public interface IA -- where K : System.IComparable, System.IComparable --{ --} -- --public class A : IA -- where K : System.IComparable, System.IComparable --{ --} -- --public interface IB -- where T : System.IDisposable --{ --} -- --public class B : IB -- where T : B.Element, new() -- where K : System.IComparable, System.IComparable --{ -- public abstract class Element : A -- { -- } --} -- -- -- -- diff --combined mcs/errors/gcs0309.cs index 91c0703499e,91c0703499e..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs0309.cs +++ /dev/null @@@ -1,24 -1,24 +1,0 @@@ --// CS0309: The type `B' must be convertible to `A' in order to use it as parameter `T' in the generic type or method `Foo' --// Line: 20 -- --public class Foo -- where T : A --{ --} -- --public class A --{ --} -- --public class B --{ --} -- --class X --{ -- Foo foo; -- -- static void Main () -- { -- } --} diff --combined mcs/errors/gcs0311-2.cs index 00000000000,00000000000..664b4fe4a7a new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0311-2.cs @@@ -1,0 -1,0 +1,25 @@@ ++// CS031: The type `B' cannot be used as type parameter `T' in the generic type or method `Foo'. There is no implicit reference conversion from `B' to `I' ++// Line: 21 ++ ++public class Foo ++ where T : A, I ++{ ++} ++ ++public interface I ++{ } ++ ++public class A ++{ } ++ ++public class B : A ++{ } ++ ++class X ++{ ++ Foo foo; ++ ++ static void Main () ++ { ++ } ++} diff --combined mcs/errors/gcs0311-3.cs index 00000000000,00000000000..06bb4b0c0d2 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0311-3.cs @@@ -1,0 -1,0 +1,39 @@@ ++// CS0311: The type `B' cannot be used as type parameter `T' in the generic type or method `Foo'. There is no implicit reference conversion from `B' to `A' ++// Line: 35 ++using System; ++ ++public class Foo ++ where T : A ++{ ++ public void Test (T t) ++ { ++ Console.WriteLine (t); ++ Console.WriteLine (t.GetType ()); ++ t.Hello (); ++ } ++} ++ ++public class A ++{ ++ public void Hello () ++ { ++ Console.WriteLine ("Hello World"); ++ } ++} ++ ++public class B ++{ ++ public static implicit operator A (B b) ++ { ++ return new A (); ++ } ++} ++ ++class X ++{ ++ Foo b; ++ ++ static void Main () ++ { ++ } ++} diff --combined mcs/errors/gcs0311-4.cs index 00000000000,00000000000..3a47bebcf15 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0311-4.cs @@@ -1,0 -1,0 +1,6 @@@ ++// CS0311: The type `B' cannot be used as type parameter `X' in the generic type or method `C'. There is no implicit reference conversion from `B' to `D>' ++// Line: 3 ++class A : C> {} ++class B {} ++interface C where X : D {} ++interface D {} diff --combined mcs/errors/gcs0311.cs index 00000000000,00000000000..6ce17f55559 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0311.cs @@@ -1,0 -1,0 +1,24 @@@ ++// CS0311: The type `B' cannot be used as type parameter `T' in the generic type or method `Foo'. There is no implicit reference conversion from `B' to `A' ++// Line: 19 ++ ++public class Foo ++ where T : A ++{ ++} ++ ++public class A ++{ ++} ++ ++public class B ++{ ++} ++ ++class X ++{ ++ Foo foo; ++ ++ static void Main () ++ { ++ } ++} diff --combined mcs/errors/gcs0313.cs index 5b3d4e57e83,5b3d4e57e83..17fe7bc883f --- a/mcs/errors/gcs0313.cs +++ b/mcs/errors/gcs0313.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0313: The type `S?' cannot be used as type parameter `T' in the generic type or method `S.Foo(T)'. The nullable type `S?' never satisfies interface constraint of type `I' ++// CS0313: The type `S?' cannot be used as type parameter `T' in the generic type or method `S.Foo(T)'. The nullable type `S?' never satisfies interface constraint // Line: 16 interface I diff --combined mcs/errors/gcs0314-2.cs index 00000000000,00000000000..504053eefb6 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0314-2.cs @@@ -1,0 -1,0 +1,30 @@@ ++// CS0314: The type `T' cannot be used as type parameter `T' in the generic type or method `IB'. There is no boxing or type parameter conversion from `T' to `System.IDisposable' ++// Line: 20 ++ ++public interface IA ++ where K : System.IComparable, System.IComparable ++{ ++} ++ ++public class A : IA ++ where K : System.IComparable, System.IComparable ++{ ++} ++ ++public interface IB ++ where T : System.IDisposable ++{ ++} ++ ++public class B : IB ++ where T : B.Element, new() ++ where K : System.IComparable, System.IComparable ++{ ++ public abstract class Element : A ++ { ++ } ++} ++ ++ ++ ++ diff --combined mcs/errors/gcs0314.cs index 00000000000,00000000000..b2a9f85fecd new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0314.cs @@@ -1,0 -1,0 +1,21 @@@ ++// CS0314: The type `U' cannot be used as type parameter `T' in the generic type or method `A'. There is no boxing or type parameter conversion from `U' to `System.IComparable' ++// Line: 13 ++ ++using System; ++ ++class A ++ where T: IComparable ++{ ++} ++ ++class B ++ where V: A ++{ ++} ++ ++class Driver ++{ ++ public static void Main () ++ { ++ } ++} diff --combined mcs/errors/gcs0315.cs index 00000000000,00000000000..3ed8e1e8c92 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0315.cs @@@ -1,0 -1,0 +1,9 @@@ ++// CS0315: The type `int' cannot be used as type parameter `TEventArgs' in the generic type or method `System.EventHandler'. There is no boxing conversion from `int' to `System.EventArgs' ++// Line: 5 ++ ++class X { ++ System.EventHandler x; ++ static void Main () {} ++} ++ ++ diff --combined mcs/errors/gcs0411-7.cs index 00000000000,00000000000..c22648e5d8e new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0411-7.cs @@@ -1,0 -1,0 +1,22 @@@ ++// CS0411: The type arguments for method `C.Foo(T, System.Collections.Generic.Comparer)' cannot be inferred from the usage. Try specifying the type arguments explicitly ++// Line: 20 ++ ++using System; ++using System.Collections.Generic; ++ ++public class C ++{ ++ static void Foo(T t, Comparer tc) ++ { ++ } ++ ++ static int Compare (int a, int b) ++ { ++ return -1; ++ } ++ ++ public static void Main () ++ { ++ Foo (1, Compare); ++ } ++} diff --combined mcs/errors/gcs0425-5.cs index 00000000000,00000000000..ca372d7a0a9 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0425-5.cs @@@ -1,0 -1,0 +1,14 @@@ ++// CS0425: The constraints for type parameter `V' of method `Foo.Test()' must match the constraints for type parameter `U' of interface method `IFoo.Test()'. Consider using an explicit interface implementation instead ++// Line: 11 ++ ++interface IFoo ++{ ++ void Test () where U : T; ++} ++ ++class Foo : IFoo ++{ ++ public void Test () where V : X ++ { ++ } ++} diff --combined mcs/errors/gcs0455-3.cs index 00000000000,00000000000..fe08835898b new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs0455-3.cs @@@ -1,0 -1,0 +1,10 @@@ ++// CS0455: Type parameter `T' inherits conflicting constraints `System.ValueType' and `Test' ++// Line: 8 ++ ++class Test ++{ } ++ ++class Foo ++ where T : struct, U ++ where U : Test ++{ } diff --combined mcs/errors/gcs0455.cs index 44aefafdc4a,44aefafdc4a..e957adff45d --- a/mcs/errors/gcs0455.cs +++ b/mcs/errors/gcs0455.cs @@@ -1,6 -1,6 +1,5 @@@ // CS0455: Type parameter `T' inherits conflicting constraints `Test' and `World' --// Line: 13 --using System; ++// Line: 11 class Test { } @@@ -12,9 -12,9 +11,3 @@@ class Foo': Cannot derive from type parameter `T' // Line: 4 class Stack : T { } diff --combined mcs/errors/gcs0695-2.cs index 9600a375e2b,9600a375e2b..791967c8ba6 --- a/mcs/errors/gcs0695-2.cs +++ b/mcs/errors/gcs0695-2.cs @@@ -1,4 -1,4 +1,4 @@@ --// gcs0695.cs: `A' cannot implement both `I>' and `I' because they may unify for some type parameter substitutions ++// CS0695: `A' cannot implement both `I' and `I>' because they may unify for some type parameter substitutions // Line: 7 interface I diff --combined mcs/errors/gcs0695-3.cs index 447a0b29dab,447a0b29dab..d352d9936b3 --- a/mcs/errors/gcs0695-3.cs +++ b/mcs/errors/gcs0695-3.cs @@@ -1,4 -1,4 +1,4 @@@ --// gcs0695.cs: `C' cannot implement both `I>' and `I' because they may unify for some type parameter substitutions ++// CS0695: `C' cannot implement both `I' and `I>' because they may unify for some type parameter substitutions // Line: 10 interface I diff --combined mcs/errors/gcs0695-4.cs index 8cf0ba4a547,8cf0ba4a547..fdefb0e5912 --- a/mcs/errors/gcs0695-4.cs +++ b/mcs/errors/gcs0695-4.cs @@@ -1,4 -1,4 +1,4 @@@ --// gcs0695.cs: `C' cannot implement both `I' and `I>' because they may unify for some type parameter substitutions ++// CS0695: `C' cannot implement both `I>' and `I' because they may unify for some type parameter substitutions // Line: 10 interface I diff --combined mcs/errors/gcs0695.cs index 51efc8985bb,51efc8985bb..d181402c693 --- a/mcs/errors/gcs0695.cs +++ b/mcs/errors/gcs0695.cs @@@ -1,4 -1,4 +1,4 @@@ --// gcs0695.cs: `A' cannot implement both `I' and `I' because they may unify for some type parameter substitutions ++// CS0695: `A' cannot implement both `I' and `I' because they may unify for some type parameter substitutions // Line: 7 interface I diff --combined mcs/errors/gcs0703-3.cs index 95b03d1af49,95b03d1af49..72e78e16ffd --- a/mcs/errors/gcs0703-3.cs +++ b/mcs/errors/gcs0703-3.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS0703: Inconsistent accessibility: constraint type `C.I' is less accessible than `Foo()' ++// CS0703: Inconsistent accessibility: constraint type `C.I' is less accessible than `C.Foo()' // Line: 10 public class C diff --combined mcs/errors/gcs1502-2.cs index 0bcbbefb470,0bcbbefb470..46bb5f7c91c --- a/mcs/errors/gcs1502-2.cs +++ b/mcs/errors/gcs1502-2.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS1502: The best overloaded method match for `A.A(System.Collections.Generic.IList>)' has some invalid arguments ++// CS1502: The best overloaded method match for `A.A(System.Collections.Generic.IList[])' has some invalid arguments // Line: 40 using System; using System.Collections; diff --combined mcs/errors/gcs1503-2.cs index 24fa1e66628,24fa1e66628..00000000000 deleted file mode 100644,100644 --- a/mcs/errors/gcs1503-2.cs +++ /dev/null @@@ -1,22 -1,22 +1,0 @@@ --// CS1503: Argument `#2' cannot convert `method group' expression to type `System.Collections.Generic.Comparer' --// Line: 20 -- --using System; --using System.Collections.Generic; -- --public class C --{ -- static void Foo(T t, Comparer tc) -- { -- } -- -- static int Compare (int a, int b) -- { -- return -1; -- } -- -- public static void Main () -- { -- Foo (1, Compare); -- } --} diff --combined mcs/errors/gcs1640.cs index 6060443b44b,6060443b44b..652f3ffc6a8 --- a/mcs/errors/gcs1640.cs +++ b/mcs/errors/gcs1640.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS1640: foreach statement cannot operate on variables of type `T' because it contains multiple implementation of `System.Collections.Generic.IEnumerable.GetEnumerator()'. Try casting to a specific implementation ++// CS1640: foreach statement cannot operate on variables of type `T' because it contains multiple implementation of `System.Collections.Generic.IEnumerable'. Try casting to a specific implementation // Line: 11 using System.Collections.Generic; diff --combined mcs/errors/gcs1961-39.cs index d0e2b561b6b,d0e2b561b6b..3938d68355b --- a/mcs/errors/gcs1961-39.cs +++ b/mcs/errors/gcs1961-39.cs @@@ -1,4 -1,4 +1,4 @@@ --// CS1961: The covariant type parameter `V' must be contravariantly valid on `Foo(T)' ++// CS1961: The covariant type parameter `V' must be contravariantly valid on `I.Foo(T)' // Line: 6 interface I diff --combined mcs/errors/gcs3005.cs index 00000000000,00000000000..2abd8cbcab7 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs3005.cs @@@ -1,0 -1,0 +1,13 @@@ ++// CS3005: Identifier `CLSClass.Method(int)' differing only in case is not CLS-compliant ++// Line: 12 ++// Compiler options: -warnaserror ++ ++[assembly:System.CLSCompliant (true)] ++ ++public class BaseClass { ++ public int method; ++} ++ ++public class CLSClass : BaseClass { ++ public static void Method(int arg) {} ++} diff --combined mcs/errors/gcs3009.cs index 00000000000,00000000000..d562140a686 new file mode 100644 --- /dev/null +++ b/mcs/errors/gcs3009.cs @@@ -1,0 -1,0 +1,14 @@@ ++// CS3009: `C': base type `C' is not CLS-compliant ++// Line: 14 ++// Compiler options: -warnaserror -warn:1 ++ ++using System; ++[assembly:CLSCompliant(true)] ++ ++public class C ++{ ++} ++ ++public class C : C ++{ ++}