Merge pull request #3586 from henricm/fix-win-uri-tests
[mono.git] / mcs / errors / cs1662.cs
index 9bcffc16b2325933bb1f1bcea7f879c65c44ad27..7035c189cec1d09a36e8a1abf3be6712d3ffb0b8 100644 (file)
@@ -1,13 +1,14 @@
-// cs1662.cs: Cannot convert anonymous method block to delegate type `D' because some of the return types in the block are not implicitly convertible to the delegate return type
-// Line: 11
-//
-// Return type mismatch.
-//
-delegate void D (int x);
+// CS1662: Cannot convert `lambda expression' to delegate type `D' because some of the return types in the block are not implicitly convertible to the delegate return type
+// Line: 12
 
-class X {
+using System;
+
+delegate int D (int i);
+
+class X
+{
        static void Main ()
        {
-               D d6 = delegate (int x) { return x; }; // Return type mismatch.
+               D d = (int l) => Main ();
        }
 }