Skip to content

Allow Concat in simple expression contexts#3040

Open
Copilot wants to merge 2 commits intomainfrom
copilot/add-isallowedinsimpleexpression-to-function
Open

Allow Concat in simple expression contexts#3040
Copilot wants to merge 2 commits intomainfrom
copilot/add-isallowedinsimpleexpression-to-function

Conversation

Copy link

Copilot AI commented Mar 19, 2026

ConcatFunction was missing IsAllowedInSimpleExpressions => true, causing it to be rejected when EnforceSimpleExpressionConstraint is active — inconsistent with other string functions like Concatenate, Replace, and Substitute.

Changes

  • Concat.cs — Added public override bool IsAllowedInSimpleExpressions => true; to ConcatFunction
  • BinderTests.cs — Added Concat(["a","b"], Value) to TestExpressionSimpleConstraintValid to cover this case
// Now valid in simple expression contexts:
Concat(["a", "b"], Value, ", ")

…tests

Co-authored-by: lesaltzm <69215460+lesaltzm@users.noreply.github.com>
@lesaltzm lesaltzm marked this pull request as ready for review March 19, 2026 21:05
@lesaltzm lesaltzm requested a review from a team as a code owner March 19, 2026 21:05
@lesaltzm
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jas-valgotar
Copy link
Contributor

✅ No public API change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants