Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support including imported types in user-defined tagged unions #13728

Merged
merged 2 commits into from Mar 27, 2024

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Mar 27, 2024

Resolves #13661

User-defined tagged unions currently allow template authors to use type references as members of the union, but authors will encounter an unhandled exception if the referent is an imported type. This PR updates the tagged union member resolution to support imported types, resource-defined types, and type property accesses.

Microsoft Reviewers: Open in CodeFlow

@jeskew jeskew requested a review from a team March 27, 2024 17:08
Copy link
Contributor

github-actions bot commented Mar 27, 2024

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

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

Copy link
Contributor

github-actions bot commented Mar 27, 2024

Test Results

    66 files   -     33      66 suites   - 33   22m 56s ⏱️ - 21m 34s
10 721 tests  -     18  10 719 ✅  -     18  2 💤 ±0  0 ❌ ±0 
25 338 runs   - 12 659  25 334 ✅  - 12 657  4 💤  - 2  0 ❌ ±0 

Results for commit e2b37ee. ± Comparison against base commit f708983.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@majastrz majastrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jeskew jeskew merged commit b060945 into main Mar 27, 2024
44 checks passed
@jeskew jeskew deleted the jeskew/13661 branch March 27, 2024 20:31
StephenWeatherford pushed a commit that referenced this pull request Apr 1, 2024
Resolves #13661 

User-defined tagged unions currently allow template authors to use type
references as members of the union, but authors will encounter an
unhandled exception if the referent is an imported type. This PR updates
the tagged union member resolution to support imported types,
resource-defined types, and type property accesses.
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/13728)
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.

"tagged union types" not working with imported members
2 participants