mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6812 from ethereum/asmCallvalue
Do not require payable for callvalue instruction.
This commit is contained in:
-1
@@ -8,4 +8,3 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (92-103): "msg.value" and "callvalue()" can only be used in payable public functions. Make the function "payable" or use an internal function to avoid this error.
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (81-92): "msg.value" and "callvalue()" can only be used in payable public functions. Make the function "payable" or use an internal function to avoid this error.
|
||||
// Warning: (17-108): Function state mutability can be restricted to view
|
||||
|
||||
+2
@@ -9,3 +9,5 @@ contract C
|
||||
return f();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (17-121): Function state mutability can be restricted to view
|
||||
|
||||
-1
@@ -11,4 +11,3 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (99-100): This modifier uses "msg.value" or "callvalue()" and thus the function has to be payable or internal.
|
||||
|
||||
Reference in New Issue
Block a user