Skip to content

Commit ce19b3f

Browse files
committed
address pr comments
1 parent 258cee0 commit ce19b3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/language/src/validators/attribute-application-validator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ function assignableToAttributeParam(arg: AttributeArg, param: AttributeParam, at
365365
if (dstType === 'ContextType') {
366366
// ContextType is inferred from the attribute's container's type
367367
if (isDataField(attr.$container)) {
368-
// If the field is Typed JSON, and the param is @default, the argument must be a string
368+
// If the field is Typed JSON, and the attribute is @default, the argument must be a string
369369
const dstIsTypedJson = hasAttribute(attr.$container, '@json');
370-
if (dstIsTypedJson && param.default) {
370+
if (dstIsTypedJson && attr.decl.ref?.name === '@default') {
371371
return argResolvedType.decl === 'String';
372372
}
373373
dstIsArray = attr.$container.type.array;

0 commit comments

Comments
 (0)