[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / errors / cs0029-8.cs
1 // CS0029: Cannot implicitly convert type `string' to `Test.String'
2 // Line: 38
3
4 using System;
5
6 namespace Test
7 {
8         using Text = System.Text;
9         using Str = System.String;
10         
11         public class String
12         {
13                 string s;
14                 public String(string s)
15                 {
16                         this.s=s;
17                 }
18
19                 public static implicit operator Str (String s1) 
20                 {
21                         if(s1==null) return null;
22                         return s1.ToString();
23                 }
24         }
25 }
26
27 namespace TestCompiler
28 {
29         using String=Test.String;
30         
31         class MainClass
32         {
33                 public static void Main(string[] args)
34                 {
35                         Console.WriteLine("Hello World!");
36                         String a="bonjour";
37                         int i=1;
38                         Console.WriteLine(i+a);
39                 }
40         }
41 }