Error and Code completion generic problem for extension method
using System.Collections.Generic;
public static class A {
public static T Push<T>(this List<T> thiz, T item) {
thiz.Add(item);
return item;
}
}
public class B {
private List<int> List = new List<int>();
private void J() {
var a = List.Push(0); //Error
List.Add(0); //Ok
List. //No code completion
}
}
public class C {
private void J() {
var List = new List<int>();
var a = List.Push(0); //Error
List. //No code completion
List.Add(0); //Ok
}
}
Original issue: https://github.com/consulo/consulo/issues/313. Moved by @VISTALL
Error and Code completion generic problem for extension method