Reporter | Vladimir Reshetnikov (nikov) |
---|---|
Created | May 1, 2012 3:20:08 AM |
Updated | May 1, 2012 3:20:36 AM |
Priority | Normal |
Type | Bug |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
using System; using System.Collections.Generic; using System.Linq; namespace QuickProj { internal static class Program { private static void Main() { int[] x = { 1, 2 }; new Lazy<IEnumerable<int>>(() => x.ToList()); // Replace with method group } } }
Actual:
using System; using System.Collections.Generic; using System.Linq; namespace QuickProj { internal static class Program { private static void Main() { int[] x = { 1, 2 }; new Lazy<IEnumerable<int>>(x.ToList<>); // error CS1525: Invalid expression term '>' } } }
Expected:
using System; using System.Collections.Generic; using System.Linq; namespace QuickProj { internal static class Program { private static void Main() { int[] x = { 1, 2 }; new Lazy<IEnumerable<int>>(x.ToList); // OK } } }