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

test-307.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8958075a4da8f28a1dffebebd78fb3caaeea2ae8 (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
using System;

using C = A.D;

public class A
{
	public class D : IDisposable 
	{
		void IDisposable.Dispose () { throw new Exception ("'using' and 'new' didn't resolve C as A+B+C"); }
	}

	public class B
	{
		class C : IDisposable 
		{
			void IDisposable.Dispose () { }
		}

		public B () {
			using (C c = new C ()) {
			}
		}
	}

	public static void Main()
	{
		object o = new A.B();
	}
}