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

test-940.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d7c68f0e34de3213c9fedda3f66a5142615e1d46 (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
// Compiler options: -unsafe

using System;

struct nint
{
	public static nint operator * (nint a, nint b)
	{
		return a;
	}

	public static implicit operator long (nint v)
	{
		return 0;
	}
}

class X
{
	public static void Main ()
	{
		nint width;
		nint bytesPerRow;

		unsafe {
			var da = (uint*)0;
			var dp1 = da + width * bytesPerRow;
			var dp2 = width * bytesPerRow + da;
		}
	}
}