Skip to content

Variable collision silently fails during build #17192

Closed

Description

Bicep version

0.35.1

Describe the bug

I have an imported variable called Location.
I also have a local variable location.
I set the appServicePlan resource location to location.
Even though I expect location to be assigned, surprisingly the value of Location is used instead.
When I changed the local variable location to loc it solved the issue.

It should be either a build error or at least a warning but currently nothing indicates an issue.

To Reproduce

import { Location } from 'location.bicep' // Location = 1
var location = 2
output output_of_location = location // returns 1

Additional context

-

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Quality Sprintbug

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions