consulo-csharp icon indicating copy to clipboard operation
consulo-csharp copied to clipboard

Method resolving ignore lambda type for prioritize

Open VISTALL opened this issue 11 years ago • 0 comments

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading.Tasks;

public class Program {

  static void Main() {
    test(() => {
      return ""; // error expected void but found String
    });

    // out - func
  }

  static void test(Action actionString) {
    Console.WriteLine("action");
    actionString();
  }

  static void test(Func<String> action) {
    Console.WriteLine("func");
    action();
  }
}

eddd86b5492012c4072c21e58dec

VISTALL avatar Jan 05 '15 21:01 VISTALL