From aa3bb67fa282f6195f5d77e5dc60b819efbd47e7 Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Sun, 6 Mar 2022 18:49:45 +0800 Subject: [PATCH] fixed 7a1ca4a from https://gitee.com/houhaoyu/developtools_ace-ets2bundle/pulls/304 houhaoyu@huawei.com fix error attr style not warning Signed-off-by: houhaoyu Change-Id: I39579700ec622e9af19c97c6e673cc69cc3dcb97 --- compiler/src/process_component_build.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index d8db918fd..a3039e11e 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -522,6 +522,13 @@ export function bindComponentAttr(node: ts.ExpressionStatement, identifierNode: let temp: any = node.expression; const statements: ts.Statement[] = []; const lastStatement: AnimationInfo = { statement: null, kind: false }; + if (ts.isPropertyAccessExpression(temp)) { + log.push({ + type: LogType.ERROR, + message: `'${node.getText()}' does not meet UI component syntax.`, + pos: node.getStart() + }); + } while (temp && ts.isCallExpression(temp) && temp.expression) { if (temp.expression && (validatePropertyAccessExpressionWithCustomBuilder(temp.expression) || validateIdentifierWithCustomBuilder(temp.expression))) { -- Gitee