Επεξεργασία

Κοινή χρήση μέσω


Bicep diagnostic code - BCP294

This diagnostic occurs when you use values of different data types in a union type definition.

Description

Type unions must be reducible to a single ARM type (such as 'string', 'int', or 'bool').

Level

Error

Examples

The following example raises the diagnostic because there are different types used in the union type:

type foo = 'a' | 1

You can fix the diagnostic by using a single data type for the union type definition:

type foo = 'a' | 'b'

Next steps

For more information about Bicep diagnostics, see Bicep core diagnostics.