This project has moved. For the latest updates, please go here.
1
Vote

Type check of anonymous method/lambda assignment does not work

description

Following snippet raises a warning, which is wrong behavior since the return fragment type is correct.
[return: CustomType]
public delegate object AnnotatedDelegate([CustomType] object parameter);

public void Calls()
{
  AnnotatedDelegate annotatedDelegate;
  annotatedDelegate = x => x;
}

comments