Skip to content

Commit

Permalink
Return type based on PFxV1 flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson-joyle committed Dec 16, 2024
1 parent 5e675d8 commit 8fe1a97
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/libraries/Microsoft.PowerFx.Core/Texl/Remove.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,7 @@ public override bool CheckTypes(CheckTypesContext context, TexlNode[] args, DTyp
}
}

if (context.AnalysisMode)
{
// Remove returns the new collection, so the return schema is the same as the collection schema.
returnType = collectionType;
}
else
{
returnType = DType.Void;
}
returnType = context.Features.PowerFxV1CompatibilityRules ? DType.Void : collectionType;

return fValid;
}
Expand Down Expand Up @@ -459,15 +451,7 @@ public override bool CheckTypes(CheckTypesContext context, TexlNode[] args, DTyp
}
}

if (context.AnalysisMode)
{
// Remove returns the new collection, so the return schema is the same as the collection schema.
returnType = collectionType;
}
else
{
returnType = DType.Void;
}
returnType = context.Features.PowerFxV1CompatibilityRules ? DType.Void : collectionType;

return fValid;
}
Expand Down

0 comments on commit 8fe1a97

Please sign in to comment.