Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
f762684c
Unverified
Commit
f762684c
authored
Oct 12, 2019
by
yann300
Committed by
GitHub
Oct 12, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1313 from ethereum/fix/#1108
delete from mapping will not show warning
parents
a7f577bd
ce0a216d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
deleteFromDynamicArray.js
...r/src/solidity-analyzer/modules/deleteFromDynamicArray.js
+1
-1
staticAnalysisCommon.js
...zer/src/solidity-analyzer/modules/staticAnalysisCommon.js
+10
-0
No files found.
remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.js
View file @
f762684c
...
@@ -8,7 +8,7 @@ function deleteFromDynamicArray () {
...
@@ -8,7 +8,7 @@ function deleteFromDynamicArray () {
}
}
deleteFromDynamicArray
.
prototype
.
visit
=
function
(
node
)
{
deleteFromDynamicArray
.
prototype
.
visit
=
function
(
node
)
{
if
(
common
.
isDeleteFromDynamicArray
(
node
))
this
.
relevantNodes
.
push
(
node
)
if
(
common
.
isDeleteFromDynamicArray
(
node
)
&&
!
common
.
isMappingIndexAccess
(
node
.
children
[
0
])
)
this
.
relevantNodes
.
push
(
node
)
}
}
deleteFromDynamicArray
.
prototype
.
report
=
function
(
compilationResults
)
{
deleteFromDynamicArray
.
prototype
.
report
=
function
(
compilationResults
)
{
...
...
remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.js
View file @
f762684c
...
@@ -536,6 +536,15 @@ function isIndexAccess (node) {
...
@@ -536,6 +536,15 @@ function isIndexAccess (node) {
}
}
/**
/**
* True if node is the access of a mapping index
* @node {ASTNode} node to check for
* @return {bool}
*/
function
isMappingIndexAccess
(
node
)
{
return
isIndexAccess
(
node
)
&&
node
.
children
&&
node
.
children
[
0
].
attributes
.
type
.
startsWith
(
'mapping'
)
}
/**
* True if call to code within the current contracts context including (delegate) library call
* True if call to code within the current contracts context including (delegate) library call
* @node {ASTNode} some AstNode
* @node {ASTNode} some AstNode
* @return {bool}
* @return {bool}
...
@@ -1103,6 +1112,7 @@ module.exports = {
...
@@ -1103,6 +1112,7 @@ module.exports = {
isSpecialVariableAccess
:
isSpecialVariableAccess
,
isSpecialVariableAccess
:
isSpecialVariableAccess
,
isDynamicArrayAccess
:
isDynamicArrayAccess
,
isDynamicArrayAccess
:
isDynamicArrayAccess
,
isIndexAccess
:
isIndexAccess
,
isIndexAccess
:
isIndexAccess
,
isMappingIndexAccess
:
isMappingIndexAccess
,
isSubScopeWithTopLevelUnAssignedBinOp
:
isSubScopeWithTopLevelUnAssignedBinOp
,
isSubScopeWithTopLevelUnAssignedBinOp
:
isSubScopeWithTopLevelUnAssignedBinOp
,
hasFunctionBody
:
hasFunctionBody
,
hasFunctionBody
:
hasFunctionBody
,
isInteraction
:
isInteraction
,
isInteraction
:
isInteraction
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment