File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
test/form/samples/builtin-prototypes/array-expression Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ export const ARRAY_PROTOTYPE = new ObjectEntity(
128
128
filter : METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NEW_ARRAY ,
129
129
find : METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN ,
130
130
findIndex : METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NUMBER ,
131
+ findLast : METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN ,
132
+ findLastIndex : METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NUMBER ,
131
133
flat : METHOD_DEOPTS_SELF_RETURNS_NEW_ARRAY ,
132
134
flatMap : METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_NEW_ARRAY ,
133
135
forEach : METHOD_CALLS_ARG_DEOPTS_SELF_RETURNS_UNKNOWN ,
Original file line number Diff line number Diff line change @@ -35,10 +35,18 @@ _filterArray[0].effect();
35
35
const _findArray = [ { effect ( ) { } } ] ;
36
36
_findArray . find ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
37
37
_findArray [ 0 ] . effect ( ) ;
38
+ [ 1 ] . findLast ( ( ) => console . log ( 1 ) || true ) ;
39
+ const _findLastArray = [ { effect ( ) { } } ] ;
40
+ _findLastArray . findLast ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
41
+ _findLastArray [ 0 ] . effect ( ) ;
38
42
[ 1 ] . findIndex ( ( ) => console . log ( 1 ) || true ) ;
39
43
const _findIndexArray = [ { effect ( ) { } } ] ;
40
44
_findIndexArray . findIndex ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
41
45
_findIndexArray [ 0 ] . effect ( ) ;
46
+ [ 1 ] . findLastIndex ( ( ) => console . log ( 1 ) || true ) ;
47
+ const _findLastIndexArray = [ { effect ( ) { } } ] ;
48
+ _findLastIndexArray . findLastIndex ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
49
+ _findLastIndexArray [ 0 ] . effect ( ) ;
42
50
[ 1 ] . flatMap ( ( ) => console . log ( 1 ) || 1 ) ;
43
51
const _flatMapArray = [ { effect ( ) { } } ] ;
44
52
_flatMapArray . flatMap ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
Original file line number Diff line number Diff line change @@ -74,12 +74,24 @@ const _findArray = [{ effect() {} }];
74
74
_findArray . find ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
75
75
_findArray [ 0 ] . effect ( ) ;
76
76
77
+ const _findLast = [ 1 ] . findLast ( ( ) => true ) ;
78
+ const _findLastEffect = [ 1 ] . findLast ( ( ) => console . log ( 1 ) || true ) ;
79
+ const _findLastArray = [ { effect ( ) { } } ] ;
80
+ _findLastArray . findLast ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
81
+ _findLastArray [ 0 ] . effect ( ) ;
82
+
77
83
const _findIndex = [ 1 ] . findIndex ( ( ) => true ) . toPrecision ( 1 ) ;
78
84
const _findIndexEffect = [ 1 ] . findIndex ( ( ) => console . log ( 1 ) || true ) ;
79
85
const _findIndexArray = [ { effect ( ) { } } ] ;
80
86
_findIndexArray . findIndex ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
81
87
_findIndexArray [ 0 ] . effect ( ) ;
82
88
89
+ const _findLastIndex = [ 1 ] . findLastIndex ( ( ) => true ) . toPrecision ( 1 ) ;
90
+ const _findLastIndexEffect = [ 1 ] . findLastIndex ( ( ) => console . log ( 1 ) || true ) ;
91
+ const _findLastIndexArray = [ { effect ( ) { } } ] ;
92
+ _findLastIndexArray . findLastIndex ( element => ( element . effect = ( ) => console . log ( 1 ) ) ) ;
93
+ _findLastIndexArray [ 0 ] . effect ( ) ;
94
+
83
95
const _flatMap = [ 1 ] . flatMap ( ( ) => 1 ) . join ( ',' ) ;
84
96
const _flatMapEffect = [ 1 ] . flatMap ( ( ) => console . log ( 1 ) || 1 ) ;
85
97
const _flatMapArray = [ { effect ( ) { } } ] ;
You can’t perform that action at this time.
0 commit comments