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

Compile-time constant check allows interpolated strings #11292

Closed
jeskew opened this issue Jul 17, 2023 · 0 comments · Fixed by #11692
Closed

Compile-time constant check allows interpolated strings #11292

jeskew opened this issue Jul 17, 2023 · 0 comments · Fixed by #11692
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jeskew
Copy link
Member

jeskew commented Jul 17, 2023

Bicep version
0.19.5

Describe the bug
The compile-time constant visitor raises no errors if it encounters an interpolated string, even though this would be compiled to an expression in the JSON template.

To Reproduce

The following Bicep template will produce the following compiled JSON template:

@description('foo${'bar'}')
param baz int
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "0.19.5.34762",
      "templateHash": "17031902422687725027"
    }
  },
  "parameters": {
    "baz": {
      "type": "int",
      "metadata": {
        "description": "[format('foo{0}', 'bar')]"
      }
    }
  },
  "resources": []
}
@jeskew jeskew added the bug Something isn't working label Jul 17, 2023
@github-project-automation github-project-automation bot moved this to Todo in Bicep Jul 17, 2023
@shenglol shenglol added this to the 0.22 milestone Aug 16, 2023
@shenglol shenglol self-assigned this Aug 16, 2023
@shenglol shenglol moved this from Todo to In Progress in Bicep Aug 29, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Bicep Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants