You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
("BCP439",DiagnosticLevel.Error,"""The @secure() decorator can only be used on statements whose type clause is "string,", "object", or a literal type."""),
5780
-
("BCP439",DiagnosticLevel.Error,"""The @secure() decorator can only be used on statements whose type clause is "string,", "object", or a literal type."""),
5779
+
("BCP308",DiagnosticLevel.Error,"""The decorator "secure" may not be used on statements whose declared type is a reference to a user-defined type."""),
5780
+
("BCP308",DiagnosticLevel.Error,"""The decorator "secure" may not be used on statements whose declared type is a reference to a user-defined type."""),
Copy file name to clipboardExpand all lines: src/Bicep.Core.IntegrationTests/UserDefinedTypeTests.cs
+37-4Lines changed: 37 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ param intParam constrainedInt
155
155
("BCP308",DiagnosticLevel.Error,"The decorator \"maxValue\" may not be used on statements whose declared type is a reference to a user-defined type."),
156
156
("BCP308",DiagnosticLevel.Error,"The decorator \"minLength\" may not be used on statements whose declared type is a reference to a user-defined type."),
157
157
("BCP308",DiagnosticLevel.Error,"The decorator \"maxLength\" may not be used on statements whose declared type is a reference to a user-defined type."),
158
-
("BCP439",DiagnosticLevel.Error,"The @secure() decorator can only be used on statements whose type clause is \"string,\", \"object\", or a literal type."),
158
+
("BCP308",DiagnosticLevel.Error,"The decorator \"secure\" may not be used on statements whose declared type is a reference to a user-defined type."),
159
159
("BCP308",DiagnosticLevel.Error,"The decorator \"allowed\" may not be used on statements whose declared type is a reference to a user-defined type."),
160
160
("no-unused-params",DiagnosticLevel.Warning,"Parameter \"stringParam\" is declared but never used."),
161
161
("BCP308",DiagnosticLevel.Error,"The decorator \"minValue\" may not be used on statements whose declared type is a reference to a user-defined type."),
@@ -1991,13 +1991,46 @@ public void Secure_decorator_is_blocked_on_any_and_resource_derived_types()
1991
1991
type untyped = any
1992
1992
1993
1993
@secure()
1994
-
type rdt = resourceInput<'Microsoft.Resources/deployments@2022-09-01'>.name
1994
+
type rdt = resourceInput<'Microsoft.Compute/virtualMachines/extensions@2019-12-01'>.properties.settings
("BCP439",DiagnosticLevel.Error,"The @secure() decorator can only be used on statements whose type clause is \"string,\", \"object\", or a literal type."),
2000
-
("BCP439",DiagnosticLevel.Error,"The @secure() decorator can only be used on statements whose type clause is \"string,\", \"object\", or a literal type."),
1999
+
("BCP440",DiagnosticLevel.Error,"The @secure() decorator can only be used on statements whose type is a subtype of \"string\" or \"object\"."),
2000
+
("BCP440",DiagnosticLevel.Error,"The @secure() decorator can only be used on statements whose type is a subtype of \"string\" or \"object\"."),
0 commit comments