diff options
Diffstat (limited to 'mcs/errors/gcs0310-5.cs')
-rw-r--r-- | mcs/errors/gcs0310-5.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mcs/errors/gcs0310-5.cs b/mcs/errors/gcs0310-5.cs new file mode 100644 index 00000000000..90a4cd62fe1 --- /dev/null +++ b/mcs/errors/gcs0310-5.cs @@ -0,0 +1,15 @@ +// CS0310: The type `string' must have a public parameterless constructor in order to use it as parameter `T' in the generic type or method `Program.Ret<T>()' +// Line: 10 + +public static class Program +{ + static void Main () + { + Ret<string> (); + } + + static T Ret<T> () where T : new () + { + return new T (); + } +} |