New test.
authorMarek Safar <marek.safar@gmail.com>
Thu, 8 Nov 2007 15:04:25 +0000 (15:04 -0000)
committerMarek Safar <marek.safar@gmail.com>
Thu, 8 Nov 2007 15:04:25 +0000 (15:04 -0000)
svn path=/trunk/mcs/; revision=89195

mcs/errors/cs0029-8.cs [new file with mode: 0644]

diff --git a/mcs/errors/cs0029-8.cs b/mcs/errors/cs0029-8.cs
new file mode 100644 (file)
index 0000000..0a4aeae
--- /dev/null
@@ -0,0 +1,41 @@
+// CS0029: Cannot implicitly convert type `string' to `Test.String'
+// Line: 38
+
+using System;
+
+namespace Test
+{
+       using Text = System.Text;
+       using Str = System.String;
+       
+       public class String
+       {
+               string s;
+               public String(string s)
+               {
+                       this.s=s;
+               }
+
+               public static implicit operator Str (String s1) 
+               {
+                       if(s1==null) return null;
+                       return s1.ToString();
+               }
+       }
+}
+
+namespace TestCompiler
+{
+       using String=Test.String;
+       
+       class MainClass
+       {
+               public static void Main(string[] args)
+               {
+                       Console.WriteLine("Hello World!");
+                       String a="bonjour";
+                       int i=1;
+                       Console.WriteLine(i+a);
+               }
+       }
+}