File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -182,13 +182,16 @@ class ExplicitTypesChecker extends BaseChecker {
182
182
fixStatement ( node , errorVar ) {
183
183
const range = this . findTypeRanges ( node , errorVar )
184
184
185
- // previous script searches all json and if two unit are in the same line
185
+ // previous script searches all json and if two uint/uint256/ufixed/etc are in the same line
186
186
// it will return two set of range values
187
+ // this is to remove the first one if it's already been corrected
188
+ // and to push it to the array to store the corrected ones
187
189
if ( alreadyFixedRanges . includes ( range [ 0 ] ) ) {
188
190
range . shift ( )
189
191
}
190
192
alreadyFixedRanges . push ( range [ 0 ] )
191
193
194
+ // only check the first range returned when findTypesRanges return two or more
192
195
const charsToReplace = errorVar . length - 1
193
196
range [ 0 ] [ 1 ] = range [ 0 ] [ 0 ] + charsToReplace
194
197
You can’t perform that action at this time.
0 commit comments