diff options
author | Miguel de Icaza <miguel@gnome.org> | 2009-08-07 06:59:03 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2009-08-07 06:59:03 +0400 |
commit | 857f143465ba0af5ace30f28d7a02237aeccdca4 (patch) | |
tree | 012eee6f991e255d5d1bb3f5bb93b577c72e0517 /mcs | |
parent | 0b580f7a17561a17f0451a8281d5b0a847869783 (diff) |
2009-08-06 Miguel de Icaza <miguel@novell.com>
* generic.cs: This loop was incorrect, it was increment ii, but
checking for `i'. This was a change introduced to fix #327497,
now we fix #424012.
svn path=/trunk/mcs/; revision=139540
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/errors/cs0425.cs | 22 | ||||
-rw-r--r-- | mcs/mcs/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/mcs/generic.cs | 2 |
3 files changed, 27 insertions, 1 deletions
diff --git a/mcs/errors/cs0425.cs b/mcs/errors/cs0425.cs new file mode 100644 index 00000000000..6fa481dae58 --- /dev/null +++ b/mcs/errors/cs0425.cs @@ -0,0 +1,22 @@ +// CS0425: The constraints for type parameter `T' of method `Test.Baz.Method<T,V>()' must match the constraints for type parameter `T' of interface method `Test.IBar.Method<T,V>()'. Consider using an explicit interface implementation instead +// Line: 18 +namespace Test +{ + using System; + + public interface IFoo + { + } + + public interface IBar + { + void Method<T, V>() where T : IFoo where V : T; + } + + public class Baz : IBar + { + public void Method<T, V>() where T : IBar where V : T + { + } + } +} diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index 2d23c01191a..27b09d8b1d7 100644 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,5 +1,9 @@ 2009-08-06 Miguel de Icaza <miguel@novell.com> + * generic.cs: This loop was incorrect, it was increment ii, but + checking for `i'. This was a change introduced to fix #327497, + now we fix #424012. + * class.cs: Catch another case for cs0533 error, fixes #324782. 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com> diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs index efd320ae2c4..99f23607f40 100644 --- a/mcs/mcs/generic.cs +++ b/mcs/mcs/generic.cs @@ -607,7 +607,7 @@ namespace Mono.CSharp { iface = iface.GetGenericTypeDefinition (); bool ok = false; - for (int ii = 0; i < InterfaceConstraints.Length; ++ii) { + for (int ii = 0; ii < InterfaceConstraints.Length; ii++) { Type check = InterfaceConstraints [ii]; if (check.IsGenericType) check = check.GetGenericTypeDefinition (); |