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:
authorMarek Safar <marek.safar@gmail.com>2009-09-08 23:29:20 +0400
committerMarek Safar <marek.safar@gmail.com>2009-09-08 23:29:20 +0400
commite177c78c7d1bdbe3ccd292a938ee726c1fb871a1 (patch)
treedf2af92617bb5bd5e63d0304bd89b7fb17cdbfb8 /mcs/errors
parentbf242cd0b1a48ee70350179a2237b36544d24fd4 (diff)
New tests.
svn path=/trunk/mcs/; revision=141540
Diffstat (limited to 'mcs/errors')
-rw-r--r--mcs/errors/cs0039-2.cs10
-rw-r--r--mcs/errors/gcs0310-5.cs15
2 files changed, 25 insertions, 0 deletions
diff --git a/mcs/errors/cs0039-2.cs b/mcs/errors/cs0039-2.cs
new file mode 100644
index 00000000000..f954adf0e8d
--- /dev/null
+++ b/mcs/errors/cs0039-2.cs
@@ -0,0 +1,10 @@
+// CS0039: Cannot convert type `string' to `C' via a built-in conversion
+// Line: 8
+
+class C
+{
+ public static void Main ()
+ {
+ C c = "test" as C;
+ }
+}
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 ();
+ }
+}