Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-599.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 034f6d96488ba283e3ab79d94f178c7ad78c0895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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;
		}
	}
}