Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

51 lines
676 B
C#

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 String (string s1)
{
if(s1==null) return null;
return new String(s1);
}
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 int Main ()
{
String a = "a";
int i=1;
a+=i;
string s = i + a;
Console.WriteLine (s);
if (s != "1Test.String")
return 1;
return 0;
}
}
}