The following classes build fine on Windows (both VS and XS), but cause compilation error on Mac:
public static class EmptyTask
{
public static Task Task { get { return Utils.GetTaskFromResult(0); } }
}
public static class EmptyTask<T>
{
public static Task<T> Task { get { return _task; } }
private static readonly Task<T> _task = Utils.GetTaskFromResult(default(T));
}
The code compiles, but when I try to use it in non-generic manner:
var t = EmptyTask.Task;
then compiler complains about ambiguity between EmptyTask.Task and EmptyTask.Task.