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/gcs0310.cs
parent6ab9c0ca2a6e382bb3a1c0ad0b3502a59eac6f31 (diff)
New tests.
svn path=/trunk/mcs/; revision=24821
Diffstat (limited to 'mcs/errors/gcs0310.cs')
-rw-r--r--mcs/errors/gcs0310.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/mcs/errors/gcs0310.cs b/mcs/errors/gcs0310.cs
new file mode 100644
index 00000000000..acb58000997
--- /dev/null
+++ b/mcs/errors/gcs0310.cs
@@ -0,0 +1,23 @@
+// CS0310: The type 'A' must have a public parameterless constructor in
+// order to use it as parameter 'T' in the generic type or method 'Foo<T>'
+// Line: 18
+
+public class Foo<T>
+ where T : new ()
+{
+}
+
+class A
+{
+ private A ()
+ { }
+}
+
+class X
+{
+ Foo<A> foo;
+
+ static void Main ()
+ {
+ }
+}