diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index 1df2475149a40ec3fd8c439fa43ab1edbed563e6..c2f1cd96b48e9a996ff3869b4648cef44657968b 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -222,5 +222,14 @@ export function testUTSJSONObject() : Result { // #END }) + + test('useless-as', () => { + const obj = { + a: { b: { c: 'c' } } + }; + ((obj["a"] as UTSJSONObject)["b"] as UTSJSONObject)["c"] = "c1" + expect(obj.getString("a.b.c")).toEqual('c1') + + }) }) } \ No newline at end of file