Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2004-03-31 05:06:58 +0400
committerMartin Baulig <martin@novell.com>2004-03-31 05:06:58 +0400
commit91fd729353f50969f0dd4afa61bb9421d61e8e8b (patch)
tree5caeff039fec9b6eea7ddbf4407a6fae50e24897 /mcs/errors/gcs0309-2.cs
parent6ab9c0ca2a6e382bb3a1c0ad0b3502a59eac6f31 (diff)
New tests.
svn path=/trunk/mcs/; revision=24821
Diffstat (limited to 'mcs/errors/gcs0309-2.cs')
-rw-r--r--mcs/errors/gcs0309-2.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/mcs/errors/gcs0309-2.cs b/mcs/errors/gcs0309-2.cs
new file mode 100644
index 00000000000..0b93cd4eba0
--- /dev/null
+++ b/mcs/errors/gcs0309-2.cs
@@ -0,0 +1,26 @@
+// CS0309: The type 'B' must be convertible to 'I' in order to use it as
+// parameter 'T' in the generic type or method 'Foo<T>'
+// Line: 21
+
+public class Foo<T>
+ where T : A, I
+{
+}
+
+public interface I
+{ }
+
+public class A
+{ }
+
+public class B : A
+{ }
+
+class X
+{
+ Foo<B> foo;
+
+ static void Main ()
+ {
+ }
+}