Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove array grouping (web compat issue) #4779

Merged
merged 2 commits into from Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/ast/nodes/shared/ArrayPrototype.ts
Expand Up @@ -133,8 +133,6 @@ export const ARRAY_PROTOTYPE = new ObjectEntity(
flat: METHOD_DEOPTS_SELF_RETURNS_NEW_ARRAY,
flatMap: METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NEW_ARRAY,
forEach: METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN,
group: METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN,
groupToMap: METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN,
includes: METHOD_RETURNS_BOOLEAN,
indexOf: METHOD_RETURNS_NUMBER,
join: METHOD_RETURNS_STRING,
Expand Down
Expand Up @@ -55,14 +55,6 @@ _flatMapArray[0].effect();
const _forEachArray = [{ effect() {} }];
_forEachArray.forEach(element => (element.effect = () => console.log(1)));
_forEachArray[0].effect();
[1].group(() => console.log(1) || true);
const _groupArray = [{ effect() {} }];
_groupArray.group((_, element) => (element.effect = () => console.log(1)));
_groupArray[0].effect();
[1].groupToMap(() => console.log(1) || true);
const _groupToMapArray = [{ effect() {} }];
_groupToMapArray.group((_, element) => (element.effect = () => console.log(1)));
_groupToMapArray[0].effect();
[1].map(() => console.log(1) || 1);
const _mapArray = [{ effect() {} }];
_mapArray.map(element => (element.effect = () => console.log(1)));
Expand Down
12 changes: 0 additions & 12 deletions test/form/samples/builtin-prototypes/array-expression/main.js
Expand Up @@ -104,18 +104,6 @@ const _forEachArray = [{ effect() {} }];
_forEachArray.forEach(element => (element.effect = () => console.log(1)));
_forEachArray[0].effect();

const _group = [1].group(() => true);
const _groupEffect = [1].group(() => console.log(1) || true);
const _groupArray = [{ effect() {} }];
_groupArray.group((_, element) => (element.effect = () => console.log(1)));
_groupArray[0].effect();

const _groupToMap = [1].groupToMap(() => true);
const _groupToMapEffect = [1].groupToMap(() => console.log(1) || true);
const _groupToMapArray = [{ effect() {} }];
_groupToMapArray.group((_, element) => (element.effect = () => console.log(1)));
_groupToMapArray[0].effect();

const _map = [1].map(() => 1).join(',');
const _mapEffect = [1].map(() => console.log(1) || 1);
const _mapArray = [{ effect() {} }];
Expand Down