Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 902 Bytes

File metadata and controls

47 lines (32 loc) · 902 Bytes
title BCP062
description The referenced declaration with name <type-name> is not valid.
ms.topic reference
ms.custom devx-track-bicep
ms.date 10/30/2025

Bicep diagnostic code - BCP062

This diagnostic occurs when the referenced declaration has an error.

Description

The referenced declaration with name <type-name> is not valid.

Level

Error

Examples

The following example raises the diagnostic because the referenced user-defined data type has an error:

type ball = object.bar

output tennisBall ball = {
  name: 'tennis'
  color: 'yellow'
}

You can fix the diagnostic by fixing the ball definition:

type ball = object

output tennisBall ball = {
  name: 'tennis'
  color: 'yellow'
}

Next steps

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