a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
21 lines
403 B
C#
21 lines
403 B
C#
// 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;
|
|
}
|
|
}
|