| title | BCP288 |
|---|---|
| description | <name> refers to a type but is being used as a value here. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This diagnostic occurs when the name specified is a type, but it's being used as a value.
<name> refers to a type but is being used as a value here.
Error
Use a name of a value.
The following example raises the diagnostic because bar is a name of a user-defined data type, not a value:
type bar = 'white'
var foo = bar You can fix the diagnostic by assigning a value to the variable foo:
var bar = 'white'
var foo = bar For more information about Bicep diagnostics, see Bicep core diagnostics.