From ee22095091e89d027877ed712d2b2ad23d4bbc4b Mon Sep 17 00:00:00 2001 From: Martin Sajti Date: Wed, 11 Jun 2025 14:19:06 +0200 Subject: [PATCH] Fix function type optional param typecheck Fix erroneous code Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/IC4121 Change-Id: Ifba7614dc3c6f7c35c4a57f6bc8b18e6b51073ba Signed-off-by: Martin Sajti --- frameworks/ets/ani/ets/@ohos.telephony.data.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/ets/ani/ets/@ohos.telephony.data.ets b/frameworks/ets/ani/ets/@ohos.telephony.data.ets index 064be07f..707bac2e 100644 --- a/frameworks/ets/ani/ets/@ohos.telephony.data.ets +++ b/frameworks/ets/ani/ets/@ohos.telephony.data.ets @@ -37,8 +37,8 @@ export default namespace data { let p1 = taskpool.execute(nativeGetCellularDataState) p1.then((content: NullishType) => { callback(new BusinessError(), content as DataConnectState); - }, (err: BusinessError): void => { - callback(err, DataConnectState.DATA_STATE_UNKNOWN); + }, (err: Error): void => { + callback(err as BusinessError, DataConnectState.DATA_STATE_UNKNOWN); }); } -- Gitee