diff --git a/ets2panda/linter/lib/TypeScriptLinter.ts b/ets2panda/linter/lib/TypeScriptLinter.ts index f25df060ba02ea41fe18f02ee47b49e359d34cbf..9a517c89d1780ba470154b47253abffd0c25a1a9 100644 --- a/ets2panda/linter/lib/TypeScriptLinter.ts +++ b/ets2panda/linter/lib/TypeScriptLinter.ts @@ -1749,7 +1749,7 @@ export class TypeScriptLinter { const typeNode = this.tsTypeChecker.typeToTypeNode(type, undefined, ts.NodeBuilderFlags.None); - if (TsUtils.isArkTSCollectionsArrayType(type)) { + if (TsUtils.isArkTSCollectionsArrayLikeType(type)) { return TsUtils.isNumberLikeType(argType); } diff --git a/ets2panda/linter/lib/utils/TsUtils.ts b/ets2panda/linter/lib/utils/TsUtils.ts index d4963b4aeaca624d5b922c9058ff06d47cc30b14..8d84e6907599cc5c0c4cdc88d9854986c73addaa 100644 --- a/ets2panda/linter/lib/utils/TsUtils.ts +++ b/ets2panda/linter/lib/utils/TsUtils.ts @@ -30,7 +30,7 @@ import type { IsEtsFileCallback } from '../IsEtsFileCallback'; import { SENDABLE_DECORATOR } from './consts/SendableAPI'; import { ARKTS_COLLECTIONS_D_ETS, - COLLECTIONS_ARRAY_TYPE, + ARKTS_COLLECTIONS_TYPES, COLLECTIONS_NAMESPACE, ARKTS_LANG_D_ETS, LANG_NAMESPACE, @@ -1881,7 +1881,11 @@ export class TsUtils { } isAllowedIndexSignature(node: ts.IndexSignatureDeclaration): boolean { - // For now, relax index signature only for 'collections.Array.[_: number]: T'. + + /* + * For now, relax index signature only for specific array-like types + * with the following signature: 'collections.Array.[_: number]: T'. + */ if (node.parameters.length !== 1) { return false; @@ -1892,20 +1896,20 @@ export class TsUtils { return false; } - return TsUtils.isArkTSCollectionsArrayDeclaration(node.parent); + return TsUtils.isArkTSCollectionsArrayLikeDeclaration(node.parent); } - static isArkTSCollectionsArrayType(type: ts.Type): boolean { + static isArkTSCollectionsArrayLikeType(type: ts.Type): boolean { const symbol = type.aliasSymbol ?? type.getSymbol(); if (symbol?.declarations === undefined || symbol.declarations.length < 1) { return false; } - return TsUtils.isArkTSCollectionsArrayDeclaration(symbol.declarations[0]); + return TsUtils.isArkTSCollectionsArrayLikeDeclaration(symbol.declarations[0]); } - private static isArkTSCollectionsArrayDeclaration(decl: ts.Declaration): boolean { - if (!ts.isClassDeclaration(decl) || !decl.name || decl.name.text !== COLLECTIONS_ARRAY_TYPE) { + private static isArkTSCollectionsArrayLikeDeclaration(decl: ts.Declaration): boolean { + if (!ts.isClassDeclaration(decl) || !decl.name || !ARKTS_COLLECTIONS_TYPES.includes(decl.name.text)) { return false; } diff --git a/ets2panda/linter/lib/utils/consts/SupportedDetsIndexableTypes.ts b/ets2panda/linter/lib/utils/consts/SupportedDetsIndexableTypes.ts index c11def6407b307130a37f11fa770d961341d482f..094b58b34fd27ed3a02b49def13bbc811e3857e1 100644 --- a/ets2panda/linter/lib/utils/consts/SupportedDetsIndexableTypes.ts +++ b/ets2panda/linter/lib/utils/consts/SupportedDetsIndexableTypes.ts @@ -17,7 +17,15 @@ export const ARKTS_COLLECTIONS_D_ETS = '@arkts.collections.d.ets'; export const COLLECTIONS_NAMESPACE = 'collections'; -export const COLLECTIONS_ARRAY_TYPE = 'Array'; +export const ARKTS_COLLECTIONS_TYPES = [ + 'Array', + 'Int8Array', + 'Uint8Array', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array' +]; export const ARKTS_LANG_D_ETS = '@arkts.lang.d.ets'; diff --git a/ets2panda/linter/test_extended_features/@arkts.collections.d.ets b/ets2panda/linter/test_extended_features/@arkts.collections.d.ets index 99aa89f0015b6bb11ae523224301e58eb285c599..6ce2ae0c528791016bc8162783abe6fd090d8b5f 100644 --- a/ets2panda/linter/test_extended_features/@arkts.collections.d.ets +++ b/ets2panda/linter/test_extended_features/@arkts.collections.d.ets @@ -23,6 +23,83 @@ declare namespace collections { [k: number]: T; // Illegal [s: string]: T; // Illegal } + + class Int8Array { + constructor(length: number); + + [k: number]: number; // Ok + [s: string]: number; // Illegal + } + + class Uint8Array { + constructor(length: number); + + [k: number]: number; // Ok + [s: string]: number; // Illegal + } + + class Uint8ClampedArray { + constructor(length: number); + + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Int16Array { + constructor(length: number); + + [k: number]: number; // Ok + [s: string]: number; // Illegal + } + + class Uint16Array { + constructor(length: number); + + [k: number]: number; // Ok + [s: string]: number; // Illegal + } + + class Int32Array { + constructor(length: number); + + [k: number]: number; // Ok + [s: string]: number; // Illegal + } + + class Uint32Array { + constructor(length: number); + + [k: number]: number; // Ok + [s: string]: number; // Illegal + } + + class BigInt64Array { + constructor(length: number); + + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class BigUint64Array { + constructor(length: number); + + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Float32Array { + constructor(length: number); + + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Float64Array { + constructor(length: number); + + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } } declare namespace utils { @@ -35,6 +112,61 @@ declare namespace utils { [k: number]: T; // Illegal [s: string]: T; // Illegal } + + class Int8Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Uint8Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Uint8ClampedArray { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Int16Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Uint16Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Int32Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Uint32Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class BigInt64Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class BigUint64Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Float32Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } + + class Float64Array { + [k: number]: number; // Illegal + [s: string]: number; // Illegal + } } export default collections; \ No newline at end of file diff --git a/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.autofix.json b/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.autofix.json deleted file mode 100644 index d7187050025d63bf1eba1547c061ac33ee127938..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.autofix.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2024 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 9, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 23, - "column": 9, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 24, - "column": 9, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 30, - "column": 9, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 31, - "column": 9, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 35, - "column": 9, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 36, - "column": 9, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.autofix.skip b/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..83ec646e2962f8ba924db5d86c6f3dcbc67c5270 --- /dev/null +++ b/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.json b/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.json index 25eb232621469d33dc23591d7eaeed72326319f3..2244c0ed44ccbad4dd4060b2728f615284e49835 100644 --- a/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.json +++ b/ets2panda/linter/test_extended_features/@arkts.collections.d.ets.json @@ -36,28 +36,294 @@ "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" }, { - "line": 30, + "line": 31, "column": 9, "problem": "IndexMember", "suggest": "", "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" }, { - "line": 31, + "line": 38, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 44, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 45, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 52, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 59, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 66, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 73, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 79, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 80, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 86, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 87, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 93, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 94, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 100, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 101, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 107, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 108, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 112, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 113, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 117, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 118, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 122, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 123, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 127, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 128, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 132, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 133, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 137, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 138, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 142, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 143, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 147, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 148, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 152, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 153, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 157, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 158, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 162, + "column": 9, + "problem": "IndexMember", + "suggest": "", + "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" + }, + { + "line": 163, "column": 9, "problem": "IndexMember", "suggest": "", "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" }, { - "line": 35, + "line": 167, "column": 9, "problem": "IndexMember", "suggest": "", "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" }, { - "line": 36, + "line": 168, "column": 9, "problem": "IndexMember", "suggest": "", diff --git a/ets2panda/linter/test_extended_features/indexable_collections_array.ets b/ets2panda/linter/test_extended_features/indexable_collections_array.ets index fcc44e00d4325490e01b50994308838e306af0b0..96d44513456a68d3f086ad3158eed6dde28a298b 100644 --- a/ets2panda/linter/test_extended_features/indexable_collections_array.ets +++ b/ets2panda/linter/test_extended_features/indexable_collections_array.ets @@ -27,3 +27,61 @@ const str = "abc"; console.log(array1[str]); // Illegal console.log(set1[0]); // Illegal + +let int8arr = new collections.Int8Array(10); +let uint8arr = new collections.Uint8Array(10); +let uint8clampedarr = new collections.Uint8ClampedArray(10); +let int16arr = new collections.Int16Array(10); +let uint16arr = new collections.Uint16Array(10); +let int32arr = new collections.Int32Array(10); +let uint32arr = new collections.Uint32Array(10); +let float32arr = new collections.Float32Array(10); +let float64arr = new collections.Float64Array(10); +let bigint64arr = new collections.BigInt64Array(10); +let biguint64arr = new collections.BigUint64Array(10); + +console.log(int8arr[0]); // Legal +console.log(uint8arr[0]); // Legal +console.log(uint8clampedarr[0]); // Illegal +console.log(int16arr[0]); // Legal +console.log(uint16arr[0]); // Legal +console.log(int32arr[0]); // Legal +console.log(uint32arr[0]); // Legal +console.log(float32arr[0]); // Illegal +console.log(float64arr[0]); // Illegal +console.log(bigint64arr[0]); // Illegal +console.log(biguint64arr[0]); // Illegal +console.log(int8arr[num]); // Legal +console.log(uint8arr[num]); // Legal +console.log(uint8clampedarr[num]); // Illegal +console.log(int16arr[num]); // Legal +console.log(uint16arr[num]); // Legal +console.log(int32arr[num]); // Legal +console.log(uint32arr[num]); // Legal +console.log(float32arr[num]); // Illegal +console.log(float64arr[num]); // Illegal +console.log(bigint64arr[num]); // Illegal +console.log(biguint64arr[num]); // Illegal + +console.log(int8arr["str"]); // Illegal +console.log(uint8arr["str"]); // Illegal +console.log(uint8clampedarr["str"]); // Illegal +console.log(int16arr["str"]); // Illegal +console.log(uint16arr["str"]); // Illegal +console.log(int32arr["str"]); // Illegal +console.log(uint32arr["str"]); // Illegal +console.log(float32arr["str"]); // Illegal +console.log(float64arr["str"]); // Illegal +console.log(bigint64arr["str"]); // Illegal +console.log(biguint64arr["str"]); // Illegal +console.log(int8arr[str]); // Illegal +console.log(uint8arr[str]); // Illegal +console.log(uint8clampedarr[str]); // Illegal +console.log(int16arr[str]); // Illegal +console.log(uint16arr[str]); // Illegal +console.log(int32arr[str]); // Illegal +console.log(uint32arr[str]); // Illegal +console.log(float32arr[str]); // Illegal +console.log(float64arr[str]); // Illegal +console.log(bigint64arr[str]); // Illegal +console.log(biguint64arr[str]); // Illegal \ No newline at end of file diff --git a/ets2panda/linter/test_extended_features/indexable_collections_array.ets.autofix.json b/ets2panda/linter/test_extended_features/indexable_collections_array.ets.autofix.json deleted file mode 100644 index 129272047df919d2515e056c9ec9285cec52e40a..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_extended_features/indexable_collections_array.ets.autofix.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2024 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 25, - "column": 13, - "problem": "PropertyAccessByIndex", - "autofixable": false, - "suggest": "", - "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" - }, - { - "line": 27, - "column": 13, - "problem": "PropertyAccessByIndex", - "autofixable": false, - "suggest": "", - "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" - }, - { - "line": 29, - "column": 13, - "problem": "PropertyAccessByIndex", - "autofixable": false, - "suggest": "", - "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_extended_features/indexable_collections_array.ets.autofix.skip b/ets2panda/linter/test_extended_features/indexable_collections_array.ets.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..83ec646e2962f8ba924db5d86c6f3dcbc67c5270 --- /dev/null +++ b/ets2panda/linter/test_extended_features/indexable_collections_array.ets.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/ets2panda/linter/test_extended_features/indexable_collections_array.ets.json b/ets2panda/linter/test_extended_features/indexable_collections_array.ets.json index c183536e929ff41e0de1d15daec6f5326246465c..f3faae4dd3a9d224b3d7b2a3cbbfbbdcf3c166cd 100644 --- a/ets2panda/linter/test_extended_features/indexable_collections_array.ets.json +++ b/ets2panda/linter/test_extended_features/indexable_collections_array.ets.json @@ -34,6 +34,230 @@ "problem": "PropertyAccessByIndex", "suggest": "", "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 45, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 50, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 51, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 52, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 53, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 56, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 61, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 62, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 63, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 64, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 66, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 67, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 68, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 69, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 70, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 71, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 72, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 73, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 74, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 75, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 76, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 77, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 78, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 79, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 80, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 81, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 82, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 83, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 84, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 85, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 86, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" + }, + { + "line": 87, + "column": 13, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" } ] } \ No newline at end of file