Skip to content

Add diagnostics and tests for spread operator limitations with for-expressions#19516

Merged
polatengin merged 5 commits into
mainfrom
polatengin/19394-use-of-spread-when-property-for-expression-is-also-used-in-the-resource-body-breaks-template-emitting
May 13, 2026
Merged

Add diagnostics and tests for spread operator limitations with for-expressions#19516
polatengin merged 5 commits into
mainfrom
polatengin/19394-use-of-spread-when-property-for-expression-is-also-used-in-the-resource-body-breaks-template-emitting

Conversation

@polatengin
Copy link
Copy Markdown
Member

@polatengin polatengin commented Apr 24, 2026

Description

Updates spread operator emit validation to reject objects that combine spreads with nested property for-expressions, preventing template emission from crashing with an unexpected ForLoopExpression.

Fixes #19394

Checklist

Microsoft Reviewers: Open in CodeFlow

@polatengin polatengin added this to the v0.42 milestone Apr 24, 2026
@polatengin polatengin self-assigned this Apr 24, 2026
@polatengin polatengin added bug Something isn't working 📘 Docs Not Needed labels Apr 24, 2026
@polatengin polatengin added this to Bicep Apr 24, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Bicep Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Test this change out locally with the following install scripts (Action run 25828651766)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 25828651766
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 25828651766"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 25828651766
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 25828651766"

…tions for spread operator

Co-authored-by: Copilot <copilot@github.com>
Comment thread src/Bicep.Core.IntegrationTests/SpreadTests.cs Outdated
@stephaniezyen stephaniezyen modified the milestones: v0.42, 0.44 May 6, 2026
polatengin and others added 2 commits May 12, 2026 12:07
Co-authored-by: Anthony Martin <38542602+anthony-c-martin@users.noreply.github.com>
Comment thread src/Bicep.Core.IntegrationTests/SpreadTests.cs
@polatengin polatengin enabled auto-merge (squash) May 13, 2026 19:05
@polatengin polatengin merged commit 17b3113 into main May 13, 2026
79 of 80 checks passed
@polatengin polatengin deleted the polatengin/19394-use-of-spread-when-property-for-expression-is-also-used-in-the-resource-body-breaks-template-emitting branch May 13, 2026 21:54
@github-project-automation github-project-automation Bot moved this from Todo to Done in Bicep May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 📘 Docs Not Needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Use of spread when property for expression is also used in the resource body breaks template emitting

3 participants