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

test-326.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 31220ac9856c857fd4652749fa71e5470b7f316d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Compiler options: -langversion:default
// Anonymous method fix, implicit conversion inside an old-style constructor
// Bug 70150
using System;
public delegate double Mapper (int item);

class X
{
        public static int Main ()
        {
                Mapper mapper = new Mapper (delegate (int i){
			return i * 12; });

		if (mapper (3) == 36)
			return 0;

		// Failure
		return 1;
        }
}