Skip to content

Instantly share code, notes, and snippets.

@controlflow
Created December 12, 2019 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save controlflow/bc8b7078cc55570a1270f798be1a47b1 to your computer and use it in GitHub Desktop.
Save controlflow/bc8b7078cc55570a1270f798be1a47b1 to your computer and use it in GitHub Desktop.
var localFunctionDeclaration = declarationStatement.LocalFunctionDeclaration;
if (localFunctionDeclaration != null)
consumer.Add(localFunctionDeclaration.DeclaredElement);
if (declarationStatement.LocalFunctionDeclaration is { DeclaredElement: var function })
consumer.Add(function);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment