chriseth
16db3a84f1
Fix call graph with respect to constants.
2021-02-25 16:00:53 +01:00
Kamil Śliwak
e87cd0afdf
Check that there is an interface type before querying validity of location.
2021-02-24 11:22:40 +01:00
chriseth
e33c058a60
Merge pull request #10896 from ethereum/issue-10870
...
Fix issue with pop on storage array.
2021-02-23 17:49:17 +01:00
hrkrshnn
66d6d20f65
Converted hash collision error into a fatal type error.
...
The check is performed during ContractLevelChecker. However, the TypeChecker throws in certain cases
when it encounters functions, whose hashes collide.
2021-02-23 17:09:40 +01:00
Alexander Arlt
ae6996efc1
Fix issue with pop on storage array.
2021-02-23 14:26:55 +01:00
Kamil Śliwak
f58b64800f
Fix 'switch' style in FunctionCallGraph
2021-02-23 14:02:35 +01:00
Kamil Śliwak
7a85516b82
Remove contract reference from the call graph
2021-02-23 14:01:20 +01:00
Kamil Śliwak
6c28120f19
Move CallGraph structure to a separate module
2021-02-23 10:47:02 +01:00
Kamil Śliwak
74ef7dd790
FunctionCallGraph: operator<< for printing nodes in an unambiguous way
2021-02-23 10:46:28 +01:00
Mathias Baumann
4c1f8d69f9
Implement a Function Call Graph
2021-02-23 10:46:28 +01:00
chriseth
78a097a012
Only warn about variables being shadowed in inline assembly.
2021-02-19 14:29:22 +01:00
Alex Beregszaszi
f766700000
Remove unreachable warning for shift/exp operator
2021-02-16 13:17:58 +00:00
Alex Beregszaszi
efe3199981
Remove unreachable assertion for import resolution
2021-02-16 12:55:01 +00:00
Alex Beregszaszi
fd9050614a
Remove untriggerable errors on variadic calls (which have been removed)
2021-02-15 22:45:57 +00:00
Mathias Baumann
3a8a74cbc7
OverrideSpecifier: Check for null before dereferencing
2021-02-04 13:17:28 +01:00
hrkrshnn
ec57c791ef
Fix infinite loop when accessing circular constants from inline assembly.
2021-01-26 09:22:05 +01:00
Mathias Baumann
07a1d230cd
Fix missing error when accessing unintialized variables.
2021-01-25 14:44:15 +01:00
chriseth
6eea2f5c08
Merge pull request #9959 from a3d4/fix-ice-struct-with-mapping-assignment
...
Fix ICE caused by const structs with mappings
2021-01-13 15:19:02 +01:00
a3d4
35a25b107f
Fix ICE caused by const structs with mappings
2021-01-12 18:39:54 +01:00
chriseth
24aded266e
Dereference.
2021-01-12 14:28:27 +01:00
chriseth
7487a7d927
Use drop_exactly.
2021-01-12 14:01:10 +01:00
chriseth
b9de0c6155
Use zip.
2021-01-11 20:54:28 +01:00
chriseth
b965446182
Catch panic.
2020-12-22 11:08:44 +01:00
Alex Beregszaszi
b14a6a10cc
Report meaningful error if parsing a version pragma failed
2020-12-18 11:50:37 +00:00
hrkrshnn
f30c7cbac8
All explicit address conversions return a non-payable address
2020-12-14 18:41:27 +01:00
hrkrshnn
e1a95cfd42
Disallow conversions from literals to payable address
...
To get a payable address, one has to go through address. For example, `payable(address(0))`.
2020-12-14 16:55:48 +01:00
chriseth
e1e1337aca
Move functions into anonymous namespace.
2020-12-14 14:18:03 +01:00
chriseth
561280a5cc
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-14 11:33:40 +01:00
Alex Beregszaszi
7b347b9ec2
Introduce address(...).code
2020-12-11 03:00:30 +00:00
Alex Beregszaszi
fa37e69c25
Improved error messages when converting to/from builtin functions
2020-12-10 22:38:15 +00:00
Alex Beregszaszi
bd641a5206
Enable more C++ compiler warnings
2020-12-10 21:03:58 +00:00
Alex Beregszaszi
7cd05bf603
Introduce block.chainid
2020-12-10 17:07:54 +00:00
chriseth
482bda6887
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-10 12:15:52 +01:00
Mathias Baumann
37cc795034
Fix segfault for empty @return tags in modifiers
2020-12-10 11:54:40 +01:00
chriseth
3f748bbb94
Merge pull request #10336 from ethereum/enablecoderv2bydefault
...
[BREAKING] Enable ABI coder v2 by default.
2020-12-09 18:05:07 +01:00
chriseth
870fd24723
Merge pull request #9888 from ethereum/account-hash
...
Support address().codehash
2020-12-09 17:40:56 +01:00
Alex Beregszaszi
ad6739d0f6
Support address().codehash
2020-12-09 14:58:27 +00:00
chriseth
251f2a4d93
Fix bug in constant evaluator.
2020-12-09 15:50:53 +01:00
chriseth
d525a8bccb
Enable ABI coder v2 by default.
2020-12-09 15:25:15 +01:00
chriseth
806453aca9
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-08 21:00:09 +01:00
Alex Beregszaszi
7e88ba8da0
Enable the -Wconversion warning
2020-12-08 16:45:24 +00:00
Djordje Mijovic
acb93f3a97
Disallowing usage of msg.data in receive() function.
2020-12-08 11:49:20 +01:00
chriseth
a3c5d37d02
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-07 17:13:48 +01:00
chriseth
254119d146
Merge pull request #10506 from ethereum/superInLibs
...
Make super unavailable in libraries.
2020-12-07 14:36:42 +01:00
chriseth
b86c91d1a3
Make super unavailable in libraries.
2020-12-07 13:59:50 +01:00
Alex Beregszaszi
1e2bfbd6b2
Enable the -Wextra-semi warning
2020-12-04 17:21:19 +01:00
chriseth
4be9b409de
Remove unary plus.
2020-12-04 15:14:25 +01:00
Christian Parpart
c5d172c058
Reimplement constant evaluator.
2020-12-04 15:14:25 +01:00
chriseth
49bde69afa
Move computation of constants out of types.cpp
2020-12-04 15:14:25 +01:00
chriseth
d50676ecb0
Merge pull request #10451 from ethereum/noTypeSuper
...
No type super
2020-12-02 15:56:41 +01:00
chriseth
52c49aebe8
Disallow meta type on super.
2020-12-02 15:43:18 +01:00
chriseth
9a5902f9d7
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-02 12:28:02 +01:00
chriseth
390640f557
Merge pull request #10384 from ethereum/called_directly_feature
...
Use annotation.calledDirectly to simplify IR codegen
2020-12-01 15:07:02 +01:00
chriseth
6d1454fce6
Disallow conversion to super.
2020-12-01 14:15:50 +01:00
Mathias Baumann
c3da529a18
Mark expressions that are called directly in the annotations
2020-11-30 18:52:50 +01:00
Alex Beregszaszi
a22077f736
Rename AsmData -> AST
...
Also attempt to only include ASTForward where appropriate.
2020-11-25 17:58:02 +00:00
hrkrshnn
1a6f0fe52f
Disallow declarations to have names "this", "super" and "_".
...
There will be a declaration error 3726 if these names are used in the contract. Note that there is
an existing warning about shadowing a built-in for "this" and "super".
2020-11-25 11:14:13 +01:00
chriseth
253889cbf1
Merge remote-tracking branch 'origin/develop' into breaking
2020-11-24 16:22:03 +01:00
chriseth
67ec5f6b17
Override semantics for fallback function.
2020-11-23 14:22:37 +01:00
chriseth
fda352094f
Allow fallback function to return data.
2020-11-23 14:22:37 +01:00
chriseth
a7db4fa4a5
Merge remote-tracking branch 'origin/develop' into breaking
2020-11-18 20:05:02 +01:00
Kamil Śliwak
5560239cf5
Replace links to readthedocs.io with ones using the new domain
2020-11-18 15:20:34 +01:00
chriseth
2665eaa4fa
Support .offset and .length for calldata bytes and string arrays.
2020-11-18 01:45:56 +01:00
chriseth
e8a278eefa
Merge remote-tracking branch 'origin/develop' into breaking
2020-11-17 18:51:57 +01:00
chriseth
049c7f7a8e
Disallow using modifiers not in the current contract or in base contracts.
2020-11-17 18:33:45 +01:00
chriseth
bb97363abf
Merge pull request #9989 from ethereum/issue-9947
...
Natspec: Fix internal error when different return name was inherited
2020-11-17 13:54:03 +01:00
Mathias Baumann
559b27aaad
Natspec: Fix internal error when different return name was inherited
2020-11-17 11:56:32 +01:00
Kamil Śliwak
1bf700e088
Return a type error when an enum has more than 256 members
2020-11-16 18:58:19 +01:00
chriseth
141277dadf
Merge remote-tracking branch 'origin/develop' into breaking
2020-11-10 17:28:36 +01:00
hrkrshnn
9eafa1fa1a
Change type of super to TypeType
2020-11-10 15:38:21 +01:00
chriseth
765ed13814
Immutables with literal values are pure.
2020-11-10 13:08:42 +01:00
chriseth
04195439b7
Merge remote-tracking branch 'origin/develop' into HEAD
2020-11-09 14:28:05 +01:00
chriseth
001eac546e
Merge pull request #10161 from ethereum/VirtualLookup-static
...
Fix incorrectly set annotation.requiredLookup
2020-11-03 17:03:17 +01:00
chriseth
5ffee049fa
Merge remote-tracking branch 'origin/develop' into breaking
2020-11-03 14:05:14 +01:00
chriseth
e27a1b786b
Wording in error messages.
2020-11-03 13:31:51 +01:00
chriseth
834da7be90
Introduce abicoder pragma.
2020-11-03 13:31:50 +01:00
chriseth
b287a6e995
Disallow specifying call options multiple times.
2020-11-02 20:07:23 +01:00
hrkrshnn
adcf9eba8d
Fix incorrectly set annotation.requiredLookup
2020-10-30 15:40:06 +01:00
chriseth
bfc8e26007
Remove low-level log functions.
2020-10-22 17:50:14 +02:00
chriseth
23205711b7
Fix build failure.
2020-10-19 19:20:36 +02:00
chriseth
6979952995
Merge remote-tracking branch 'origin/develop' into HEAD
2020-10-19 18:02:50 +02:00
chriseth
527c073bb9
Checked arithmetic by default.
2020-10-19 16:58:37 +02:00
Daniel Kirchner
909ce9164a
Allow arrays of contract types as type expressions e.g. for abi.decode.
2020-10-16 19:40:41 +02:00
Daniel Kirchner
3f14c904b0
Disallow invalid use of library names as type names.
2020-10-16 18:25:08 +02:00
chriseth
f6e57a0eec
Merge pull request #10023 from ethereum/develop
...
Merge develop into breaking.
2020-10-13 18:18:53 +02:00
Mathias Baumann
006e5f2e1f
Allow path syntax for super constructor calls
2020-10-13 14:32:11 +02:00
Mathias Baumann
0b7b174945
Add AST Node IdentifierPath
2020-10-13 14:32:11 +02:00
Mathias Baumann
32b4f18023
Print warning for unnamed return parameters and no return statement
2020-10-13 13:11:29 +02:00
Kamil Śliwak
e1cc888369
Fix checkBaseABICompatibility() to make it actually check return parameters and not just ordinary parameters twice
2020-10-12 15:14:56 +02:00
a3d4
90c8c32d86
If a declaration shadows several others, group them together
2020-10-08 21:01:25 +02:00
a3d4
f29ebc0847
Fix shadowing/same-name warnings for later declarations
2020-10-08 20:22:04 +02:00
chriseth
346fe1c6c5
Constants at file-level.
2020-10-08 18:56:17 +02:00
chriseth
21dee1c8ba
Check for circular constants across contracts.
2020-10-08 18:56:17 +02:00
chriseth
2d9479b06c
Properly set scope.
2020-10-08 18:56:17 +02:00
a3d4
d7b4b4a7aa
Fix ICE caused by storage parameters with nested mappings in libraries
2020-10-07 22:07:57 +02:00
Mathias Baumann
6114cd8e8e
Add missing annotation assignments
2020-10-07 14:52:35 +02:00
Kamil Śliwak
33ff79bf82
Add missing checks for parameter compatibilty with ABIEncoderV1 in calls
2020-10-06 21:28:46 +02:00
a3d4
3c876fcb60
Fix ICE caused by an array of mappings
2020-09-29 18:17:46 +02:00
chriseth
2037b7d6b8
Merge pull request #9820 from ethereum/new-annotation-field-virtual
...
Add annotation field ``requiresVirtualLookup``
2020-09-29 15:33:54 +02:00
chriseth
8687b9a3dc
Merge pull request #9903 from a3d4/refactor-warnonshadow
...
Simplify DeclarationRegistrationHelper
2020-09-28 19:28:34 +02:00