File tree Expand file tree Collapse file tree
src/Compilers/CSharp/Portable/Parser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8697,22 +8697,8 @@ private bool IsAnonymousDelegateExpression()
86978697 return false;
86988698 }
86998699
8700- // If we didn't scan a valid tuple type, assume it's an anonymous delegate expression
8701- // since delegate declarations must have a valid return type.
8702- // This handles cases like: delegate (ref int i) { }
8703- if (scanResult != ScanTypeFlags.TupleType)
8704- {
8705- return true;
8706- }
8707-
8708- // We have a tuple type but no identifier following - check for open brace
8709- if (this.CurrentToken.Kind == SyntaxKind.OpenBraceToken)
8710- {
8711- return true;
8712- }
8713-
8714- // Default to delegate type declaration for other cases
8715- return false;
8700+ // Otherwise, assume it's an anonymous delegate expression.
8701+ return true;
87168702 }
87178703
87188704 private bool IsPossibleNewExpression()
You can’t perform that action at this time.
0 commit comments