Azure / Azure/bicep

Error with variable of type object, type object literal required.

Open
#3,788 2 comments 0 reactions 0 assignees View on GitHub
enhancement error-message
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

https://github.com/Azure/bicep/blob/022f601c96eb77bbcd6abbb4dbd270e56349583b/src/Bicep.Core.IntegrationTests/Scenarios/FallbackTopLevelResourcePropertiesTests.cs#L264

![image](https://user-images.githubusercontent.com/9027725/127233302-ff610178-ad14-40b9-bcf7-58c138b09d82.png)

This error message is not helping me to understand what the issue is here. I am not sure how I can turn an "object", into an "object literal".

I suspect that this is working as intended, but the error message could explain what is intended better. I am unsure if what I am trying to do here is illegal, or if I am just doing it incorrectly?

Contributor guide

Open the contributing guide

Research direction

Start with src/Bicep.Core.IntegrationTests/Scenarios/FallbackTopLevelResourcePropertiesTests.cs at line 264 and reproduce the reported diagnostic. Trace how the object versus object literal error is produced, then clarify the message so users can tell whether the usage is supported and what distinction matters. Done means the scenario has a more actionable diagnostic and its test coverage passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.