You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(targetis not FunctionDefinitionAst or CommandAst)
115
+
if(targetis not (FunctionDefinitionAst or CommandAst))
116
116
{
117
117
thrownewHandlerErrorException($"Asked to rename a function but the target is not a viable function type: {target.GetType()}. This should not happen as PrepareRename should have already checked for viability. File an issue if you see this.");
??thrownewTargetSymbolNotFoundException("The command to rename does not have a function definition. Renaming a function is only supported when the function is defined within the same scope"),
230
-
_ =>thrownewException("Unsupported AST type encountered")
// If the command is defined in the same parent scope as the function
287
288
returncommand.HasParent(target.Parent);
288
289
289
-
290
290
// If we get this far, we hit an edge case
291
291
thrownewInvalidOperationException("ShouldRename for a function could not determine the viability of a rename. This is a bug and you should file an issue.");
0 commit comments