Commit Graph

1108 Commits

Author SHA1 Message Date
Christian Parpart
381c63ec99 Scanner: Generate error on inbalanced RLO/LRO/PDF override markers. 2020-12-15 18:40:51 +01:00
hrkrshnn
fdaede9b3e Tests after disallowing some explicit payable conversions 2020-12-15 15:01:40 +01:00
chriseth
ffaf40950a
Merge pull request #10605 from ethereum/develop
Merge develop into breaking.
2020-12-15 14:01:01 +01:00
Djordje Mijovic
d479c98920 Adding tests for conversion of calldata slices to memory and storage and fixing syntax tests. 2020-12-15 09:21:47 +01:00
Alex Beregszaszi
edbdff8619 Update tests 2020-12-14 19:32:31 +00:00
hrkrshnn
7438c4dc16 Tests after making all explicit address conversions as non-payable 2020-12-14 18:46:01 +01:00
hrkrshnn
88c99a7538 Tests/Docs: changing type of msg.sender and tx.origin into address
And also making the type of address(literal) as non-payable address.
2020-12-14 16:55:48 +01:00
chriseth
d257ab7141 Merge remote-tracking branch 'origin/develop' into breaking 2020-12-14 16:05:12 +01:00
Alex Beregszaszi
aa042ccb87 Disallow leading zeroes in sized-types
Also avoid using boost::lexical_cast for parseSize.
2020-12-14 11:40:14 +00:00
Alex Beregszaszi
4bffd040e2 Add tests for weirdly sized types
e.g. bytes00001
2020-12-14 11:40:11 +00:00
chriseth
28374447d2
Merge pull request #10582 from ethereum/addr-literal
Fix crash with oversized address literals
2020-12-14 12:14:28 +01:00
chriseth
561280a5cc Merge remote-tracking branch 'origin/develop' into breaking 2020-12-14 11:33:40 +01:00
Alex Beregszaszi
33ff2b16ff Fix crash with oversized address literals 2020-12-11 23:45:23 +00: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
ff7e45f417 Add test cases for assigning builtins/bound functions to function types 2020-12-10 22:18:52 +00:00
chriseth
ef3bcbda97
Merge pull request #9549 from ethereum/yul-reserved
[BREAKING] Disallow using reserved identifiers in Yul
2020-12-10 18:49:44 +01:00
Alex Beregszaszi
7cd05bf603 Introduce block.chainid 2020-12-10 17:07:54 +00:00
Alex Beregszaszi
c032ad3379 Update tests 2020-12-10 17:18:15 +01:00
chriseth
d0551b67d7 Merge remote-tracking branch 'origin/develop' into breaking 2020-12-10 17:07:56 +01:00
chriseth
e15136c210
Merge pull request #10558 from ethereum/magictype-tests
Adds more tests for state access (block/tx/msg)
2020-12-10 14:05:37 +01: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
Alex Beregszaszi
f9d6abf69b Add more tests for state access (block, msg, tx, etc.)
Move some of them out of SolidityEndToEndTests. Additionally this ensures the deterministic values of the testing infrastructure.
2020-12-09 20:46:01 +00: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
1c99537b5a
Merge pull request #10550 from ethereum/chainIdView
[BREAKING] Mark chainid as view.
2020-12-09 17:41:27 +01:00
chriseth
870fd24723
Merge pull request #9888 from ethereum/account-hash
Support address().codehash
2020-12-09 17:40:56 +01:00
Daniel Kirchner
588535566f Mark chainid as view. 2020-12-09 16:55:51 +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
72f1e4ea0b Explicitly set coder to v1 for syntax tests. 2020-12-09 15:25:15 +01:00
Djordje Mijovic
acb93f3a97 Disallowing usage of msg.data in receive() function. 2020-12-08 11:49:20 +01:00
Alex Beregszaszi
66ee3ec533 Remove the \b, \f, \v escape sequences from the Scanner 2020-12-07 21:10:03 +00:00
chriseth
a3c5d37d02 Merge remote-tracking branch 'origin/develop' into breaking 2020-12-07 17:13:48 +01:00
chriseth
b86c91d1a3 Make super unavailable in libraries. 2020-12-07 13:59:50 +01:00
chriseth
4be9b409de Remove unary plus. 2020-12-04 15:14:25 +01:00
chriseth
89919e47d3 New test. 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
d56a7bb89e
Merge pull request #10489 from ethereum/develop
Merge develop into breaking.
2020-12-03 18:11:12 +01:00
hrkrshnn
9e5d7b9910 Test updates after disallowing Integer -> Contract conversion 2020-12-03 17:53:00 +01:00
Alex Beregszaszi
a9be2e4bb8 update tests 2020-12-03 17:15:45 +01:00
Alex Beregszaszi
6c0a3bd043 Ensure that builtins must be executed 2020-12-03 17:15:44 +01:00
Alex Beregszaszi
43353bb6ca update tests 2020-12-03 17:15:43 +01:00
Alex Beregszaszi
3da2b67b67 simplify parser 2020-12-03 17:14:49 +01:00
hrkrshnn
40244c5469 Tests/Docs after stricter explicit conversion. 2020-12-03 16:51:05 +01:00
chriseth
52c49aebe8 Disallow meta type on super. 2020-12-02 15:43:18 +01:00
chriseth
6d1454fce6 Disallow conversion to super. 2020-12-01 14:15:50 +01:00
chriseth
6de7eaba95 Merge remote-tracking branch 'origin/develop' into breaking 2020-12-01 10:50:13 +01:00
Djordje Mijovic
bd86588459 Adding more tests for array copying from storage to storage. 2020-12-01 08:50:36 +01:00
chriseth
3e5396598b
Merge pull request #10410 from ethereum/ir-fixedbytes-bitnot
Support BitNot on FixedBytes in IR
2020-11-26 14:42:52 +01:00
Alex Beregszaszi
cbae5ca324 Support BitNot on FixedBytes in IR 2020-11-26 13:20:02 +00:00
Djordje Mijovic
565d0cd4eb Support copying of nested calldata arrays to memory. 2020-11-26 12:13:29 +01:00
hrkrshnn
a834476de6 Tests/Docs after disallowing super, this and _ as declaration names 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
2d235bf7b0
Merge pull request #10341 from ethereum/optimizeAllocation
Do not allocate memory objects if they will be assigned directly.
2020-11-24 16:05:46 +01:00
chriseth
79669ecd48 Use new abicoder pragma. 2020-11-24 14:57:45 +01:00
chriseth
409e92580f Do not allocate memory objects if they will be assigned directly. 2020-11-24 14:11:01 +01:00
chriseth
19e9e8b550 Some more tests. 2020-11-23 15:00:00 +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
Alex Beregszaszi
8228b5b0b8 Fix test failures due to merge conflict (from develop to breaking) 2020-11-20 18:21:21 +00: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
9f0a631948
Merge pull request #10208 from ethereum/offsetLengthCalldata
Support .offset and .length for dynamic calldata arrays
2020-11-18 12:09:11 +01:00
chriseth
2665eaa4fa Support .offset and .length for calldata bytes and string arrays. 2020-11-18 01:45:56 +01:00
Kamil Śliwak
dfa0a0cdff IR codegen: Handle address() with library type argument and external library calls 2020-11-17 20:36:39 +01:00
chriseth
049c7f7a8e Disallow using modifiers not in the current contract or in base contracts. 2020-11-17 18:33:45 +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
2348b721bb Tests after changing type of super to TypeType 2020-11-10 15:38:21 +01:00
chriseth
3c1d990964
Merge pull request #10224 from ethereum/strict-literal-to-enum-conversion
[BREAKING] Strict explicit conversion between literals and enums
2020-11-10 13:15:12 +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
hrkrshnn
03f58c6b52 Strict explicit conversion between literals and enums
Explicit conversions between literals and enums are only allowed if the literal can represent a
value in the enum.
2020-11-06 19:15:02 +01:00
Alex Beregszaszi
1536e49b3d Add more syntax tests for uncovered cases 2020-11-05 10:30:09 +00:00
Harikrishnan Mulackal
24cce56215
Merge pull request #10189 from ethereum/underscore-tests
Add syntax and semantic tests for underscore
2020-11-03 17:06:31 +01:00
Alex Beregszaszi
b0864a4af9 Add syntax and semantic tests for underscore 2020-11-03 15:22:57 +00:00
hrkrshnn
29e23efc93 Tests/Docs after "stricter explicit conversion from Literals to Integers" 2020-11-03 14:31:44 +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
chriseth
e93a84ccd4 Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-28 18:19:31 +01:00
Alex Beregszaszi
24d8c2ed90 Split error codes for EVM opcodes 2020-10-28 11:45:46 +00:00
chriseth
bfc8e26007 Remove low-level log functions. 2020-10-22 17:50:14 +02:00
chriseth
6979952995 Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-19 18:02:50 +02:00
chriseth
c9ef727136 New tests. 2020-10-19 16:58:59 +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
chriseth
c86ea59384
Merge pull request #10019 from ethereum/exp-associativity
[BREAKING] Exp associativity
2020-10-13 17:03:18 +02:00
hrkrshnn
13e7012e1e Parser: Exponentiation is right associative 2020-10-13 16:38:37 +02:00
Mathias Baumann
006e5f2e1f Allow path syntax for super constructor calls 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
chriseth
0ea4bdafcd
Merge pull request #10017 from ethereum/develop
Merge develop into breaking.
2020-10-13 12:58:23 +02:00
chriseth
8a1bf41ac0
Merge pull request #10010 from ethereum/develop
Merge develop into breaking.
2020-10-12 15:33:34 +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
Kamil Śliwak
3128e82a9a Look for experimental pragmas in the module containing the definition when generating code for modifiers and inherited functions 2020-10-12 14:29:53 +02:00
chriseth
e7603d7590
Merge pull request #10003 from ethereum/more-tests-and-docs-for-mixed-abi-encoder-use-checks
More tests and some minimal docs for mixed ABI encoder use
2020-10-12 14:22:44 +02:00
Kamil Śliwak
94a49fcc4a Additional tests for ABIEncoderV1 calls using ABIEncoderV2 types 2020-10-12 13:26:01 +02:00
Christian Parpart
712d0805eb Fixes internal compiler error with an unused reference to module member. 2020-10-12 11:56:01 +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
14352ed921 Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-08 20:18:04 +02:00
chriseth
34e7ae6ff9 New tests. 2020-10-08 18:56:18 +02:00
chriseth
b2f1d558da Update existing tests. 2020-10-08 18:56:17 +02:00
chriseth
e16811e79f Merge remote-tracking branch 'origin/develop' into HEAD 2020-10-08 14:56:52 +02:00
a3d4
d7b4b4a7aa Fix ICE caused by storage parameters with nested mappings in libraries 2020-10-07 22:07:57 +02:00
Harikrishnan Mulackal
a309669f75 Disallow explicit conversions from negative literals to `address` 2020-10-07 16:06:02 +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
chriseth
b401093679
Merge pull request #9967 from ethereum/develop
Merge develop into breaking.
2020-10-06 17:45:53 +02:00
Mathias Baumann
6af16469e7 Remove unneeded assert
An error will trigger later in the name resolve phase
2020-10-05 13:01:11 +02:00
Alex Beregszaszi
32cb5207b3 Add more tests to ViewPureChecker 2020-10-02 11:57:35 +01:00
chriseth
3af21c92d2
Merge pull request #9702 from a3d4/fix-7410-arrays-of-mappings
Fix ICE caused by an array of mappings
2020-09-30 20:24:09 +02:00
Harikrishnan Mulackal
3970412422 Implemented events with function type as one of its indexed parameters 2020-09-30 12:11:38 +02:00
a3d4
a244daaacb Exclude tests with overly deep nesting from antlr grammar checks 2020-09-29 20:20:20 +02:00
a3d4
3c876fcb60 Fix ICE caused by an array of mappings 2020-09-29 18:17:46 +02:00
a3d4
3698cd54a5 Complete error coverage of Parser and SyntaxChecker 2020-09-29 16:07:02 +02:00
chriseth
4bdec8107c Merge remote-tracking branch 'origin/develop' into HEAD 2020-09-29 09:53:50 +02:00
chriseth
9115100f2a
Merge pull request #9909 from ethereum/fix-9890
Fix missing annotation settings because of early return
2020-09-28 12:27:43 +02:00
Mathias Baumann
76bb2cafe9 Fix missing annotation settings because of early return 2020-09-28 12:12:44 +02:00
chriseth
bab2d6d644
Merge pull request #9852 from ethereum/fix-9851
Typechecker: Disallow free function redefinition
2020-09-28 11:15:47 +02:00
a3d4
9721bda36e Complete error coverage of ParserBase 2020-09-28 01:56:25 +02:00
Bhargava Shastry
e2a2276272 Contract level checker: Disallow free function redefinition and alias
shadowing another free function

Co-authored-by: chriseth <chris@ethereum.org>
2020-09-25 17:09:58 +02:00
chriseth
763282343f
Merge pull request #9883 from ethereum/develop
Merge develop into breaking.
2020-09-24 16:05:51 +02:00
Alex Beregszaszi
e54110ff17 Return UTF-8 error in BoolResult and remove it from string type 2020-09-23 17:35:05 +01:00
Alex Beregszaszi
a154594de6 Display string literal as hex in error messages if it is not printable ASCII 2020-09-23 17:33:39 +01:00
Alex Beregszaszi
0e5abbd4a9 Display location of invalid UTF-8 sequence in unicode literals in SyntaxChecker 2020-09-23 17:01:02 +01:00
Alex Beregszaszi
ca743191b7 Report why assigning oversized hex strings to bytes fail 2020-09-23 16:46:47 +01:00
Alex Beregszaszi
af8d78010e Display BoolResult from implicit/explicit conversions for more clarity in error messages 2020-09-23 16:04:07 +01:00
chriseth
0c6dc1dce4
Merge pull request #9862 from ethereum/develop
Merge develop into breaking
2020-09-23 12:22:32 +02:00
chriseth
700cc4c9d3
Merge pull request #9836 from ethereum/fix-missing-check-for-nested-dynamic-arrays-with-abi-encode-decode-v1
Add missing check for nested dynamic arrays in abi.encode()/decode() functions in ABIEncoderV1
2020-09-22 15:49:17 +02:00
chriseth
83aa8c1e23
Merge pull request #9818 from a3d4/introduce-compositetype
Introduce CompositeType
2020-09-21 22:33:04 +02:00
a3d4
6b77a20134 Introduce CompositeType 2020-09-21 16:18:04 +02:00
Kamil Śliwak
aae640dd3a Fix wrong name used in error message when reporting invalid named argument 2020-09-17 18:59:18 +02:00
Kamil Śliwak
4045f41c8d Make the test for invalid named arguments more robust
- Add more parameters and use different types.
- Now it's clear that the name used in the error message is wrong.
2020-09-17 17:29:28 +02:00
Kamil Śliwak
dc62d763eb Move syntax tests for named arguments from namedAndTypeResolution/ to functionCalls/ 2020-09-17 17:29:28 +02:00
Kamil Śliwak
1a4cc4e64d Fix type check for nested arrays in abi.encode/decode functions in ABIEncoderV1
- Without this fix, nested arrays are not detected as unsupported and compiler fails on an UnimplementedError.
- Now it's consistent with how structs are handled in ABIEncoderV1.
2020-09-17 17:29:16 +02:00
chriseth
aa7a6922e7 Restrict unary negation to signed integers. 2020-09-17 15:01:53 +02:00
Kamil Śliwak
3ba3bde65e Mark string literals as not implicitly convertible to calldata arrays 2020-09-16 12:44:57 +02:00
a3d4
4ca7655b74 Correct the warning for homonymous, but not shadowing declarations 2020-09-15 02:39:21 +02:00
a3d4
d8520b0af0 Move collision warnings to StaticAnalyzer 2020-09-14 02:52:00 +02:00
a3d4
e7a6534d4f Unify collision warnings 2020-09-14 02:17:53 +02:00
chriseth
6508986077
Merge pull request #9768 from ethereum/move-event-syntax-tests-from-name-and-type-resolution
Group event-related syntax tests together
2020-09-09 16:57:30 +02:00
Kamil Śliwak
6f41e83b48 Move most event-related syntax tests from nameAndTypeResolution/ to events/ 2020-09-09 14:53:46 +02:00
Kamil Śliwak
5e9dd67a0a FunctionType::canTakeArguments(): Use the correct index when comparing named parameter types 2020-09-09 14:45:58 +02:00
Kamil Śliwak
41bcb97e36 Don't consider contracts implicitly convertible to the type of super
- `super` for all intents and purposes behaves like a type and should be a TypeType rather than ContractType. We have an issue to fix it but it's a breaking change. Until then let's at least not treat other contracts as convertible to the ContractType that `super` represents.
2020-09-08 00:29:44 +02:00
Alexander Arlt
df8bbeeb22 ViewPureChecker::reportMutability: don't check visibility on constructors. 2020-09-07 11:35:33 -05:00
Harikrishnan Mulackal
acec8f271d Type Checker: Disallow `virtual` for modifiers in libraries. 2020-09-07 11:17:38 +02:00
Alex Beregszaszi
7ef9591e64 Expose hex literal to the Yul parser
This allows nicer error messages.
2020-08-28 19:34:52 +01:00
Alex Beregszaszi
26a76c18d4 Add Yul syntax test for every Solidity keyword 2020-08-28 19:34:52 +01:00
Alex Beregszaszi
caa329066e Do not emit Solidity-only tokens in the Scanner for Yul
And simplfiy AsmParser greatly.
2020-08-28 19:34:52 +01:00
Alex Beregszaszi
a80e2c1462 Update tests for immutable variables 2020-08-28 19:06:34 +01:00
chriseth
20efba6b55
Merge pull request #9568 from ethereum/fixImmutables
Fix reads checks for complex assignment and increment/decrement for immutable variables.
2020-08-28 16:14:18 +02:00
chriseth
8b564a7be7 Fix reads checks for immutable variables. 2020-08-28 15:24:40 +02:00
chriseth
ec3f3c41dd
Merge pull request #9690 from ethereum/immutable-rhs-vardecl
Disallow assigning more than once to immutables during the variable declaration
2020-08-28 14:39:23 +02:00
Leonardo
df79a4f162
Merge pull request #9691 from ethereum/oversized-function-array
Changed canonicalName() to toString() because of internal functions
2020-08-28 13:57:47 +02:00
Harikrishnan Mulackal
7ff809dc78 Disallow assigning more than once to immutables during the vardecl 2020-08-28 13:42:54 +02:00
Harikrishnan Mulackal
672f391660 Changed canonicalName() to toString() because of internal functions 2020-08-27 21:09:35 +02:00
Alex Beregszaszi
e872b1b51e
Merge pull request #9689 from ethereum/using-for-interface
Disallow ``using for`` directive for interfaces.
2020-08-27 19:09:19 +01:00
chriseth
0798167f3d
Merge pull request #9612 from ethereum/yul-rightarrow
Introduce RightArrow (->) token
2020-08-27 16:21:18 +02:00
Harikrishnan Mulackal
c7dc42a794 Disallow `using for` directive for interfaces. 2020-08-27 15:57:51 +02:00
Harikrishnan Mulackal
7826564226 Fix infinite loop for structs in library function parameter 2020-08-27 14:18:07 +02:00
Harikrishnan Mulackal
1c066b1059 Allow type(Contract).name for abstract contracts and interfaces 2020-08-27 13:37:08 +02:00
Alex Beregszaszi
4e5b403c37 Introduce RightArrow (->) token in the scanner 2020-08-27 12:28:27 +01:00
chriseth
161ed4c948
Merge pull request #9683 from ethereum/fix-exp-neg-literal
Disallow the exponent to be a signed integer literal
2020-08-27 13:26:15 +02:00
Harikrishnan Mulackal
6f22899153 Disallow the exponent to be a signed integer literal 2020-08-27 12:08:45 +02:00
Harikrishnan Mulackal
79b2e41252 Fix inheritdoc tags trying to resolve 'empty' elements 2020-08-26 21:28:00 +02:00
chriseth
221524b153
Merge pull request #9606 from ethereum/newGrammar
Rewrite of the antlr grammar.
2020-08-26 09:57:13 +02:00
a3d4
ad311fae19 Improve error coverage of syntax checker 2020-08-20 03:23:21 +02:00
Daniel Kirchner
bd21535dd1 Rewrite of the antlr grammar. 2020-08-19 17:55:31 +02:00
chriseth
a795e4db9b
Merge pull request #9640 from a3d4/improve-error-coverage-parser
Improve error coverage of parser
2020-08-19 11:03:50 +02:00
a3d4
0f5d0b6455 Improve error coverage of parser 2020-08-19 01:37:11 +02:00
chriseth
e9f91edc4b Update existing tests. 2020-08-18 11:46:59 +02:00
chriseth
9324fb4f20 Free functions. 2020-08-18 11:46:59 +02:00
Alex Beregszaszi
babb175d86 Add more syntax tests for Yul 2020-08-13 14:20:52 +01:00
Daniel Kirchner
5d670aaa18
Merge pull request #9614 from ethereum/yul-hex
Update tests/documentation to show that hex literals are not supported in Yul
2020-08-13 03:11:45 +02:00
Alex Beregszaszi
b752551ebd Add test case for string literals in switch statements in Yul 2020-08-13 00:27:41 +01:00
Alex Beregszaszi
acb1e8c280 Add tests showing hex literals are not allowed in Yul 2020-08-13 00:27:19 +01:00
Alex Beregszaszi
bb29307b02 Add/Update tests for Yul function definition 2020-08-12 23:53:08 +01:00
chriseth
98faf82d3f
Merge pull request #9563 from ethereum/constrInLib
Fix member lookup for constructor in library.
2020-08-05 19:07:28 +02:00
chriseth
0ea5aae9aa Require inheritdoc tag to be non-empty. 2020-08-04 12:13:23 +02:00
chriseth
c96e997a3c Fix member lookup for constructor in library. 2020-08-04 10:51:40 +02:00
chriseth
73506e2858
Merge pull request #9530 from a3d4/improve-error-coverage-referenceresolver
Complete error coverage of ReferenceResolver
2020-07-28 21:12:54 +02:00
a3d4
ffdb0e37ff Complete error coverage of ReferenceResolver 2020-07-28 18:56:57 +02:00
a3d4
dbeacbafa5 Cover "Override changes modifier to public state variable." error 2020-07-28 18:55:12 +02:00
Alex Beregszaszi
291c00c3de Remove errenous error duplication and move some tests around 2020-07-28 10:45:27 +01:00
chriseth
53d497fc31
Merge pull request #9412 from ethereum/unicode-string
[BREAKING] Support unicode string literal type
2020-07-28 11:42:23 +02:00
Alex Beregszaszi
f5f86779b8 Update tests for unicode literals 2020-07-27 18:21:17 +01:00
Alex Beregszaszi
5bfcc1ffcc Update tests for string literals 2020-07-27 18:21:17 +01:00
chriseth
f24097c38d Fix internal error for invalid data location in constructor. 2020-07-27 15:00:17 +02:00
chriseth
1a1960ede0
Merge pull request #9466 from ethereum/fixTokens
Properly sort token list.
2020-07-27 10:42:31 +02:00
chriseth
7ff3d10fee
Merge pull request #9492 from ethereum/someValueTests
Some more tests for value.
2020-07-23 19:09:28 +02:00
a3d4
5b54cfbed3 Report an error if immutables not assigned 2020-07-23 16:38:54 +02:00
chriseth
4f611fbf17 Some more tests for value. 2020-07-23 14:57:47 +02:00
chriseth
a1da90d14b Adding more tests for function types 2020-07-23 14:55:32 +02:00
Djordje Mijovic
e7d5a7da10 [TypeChecker] Remove function input and return parameter names from mobileType 2020-07-23 14:39:49 +02:00
chriseth
8cfbe02cc0 Fix token list. 2020-07-23 14:28:28 +02:00
chriseth
6bb6783d39 Merge remote-tracking branch 'origin/develop' into breaking 2020-07-22 15:26:44 +02:00
a3d4
7e0a291fac Add "Only one receive function is allowed"-error to syntax tests 2020-07-22 04:09:24 +02:00
chriseth
8b7567f963 Fix merge conflicts. 2020-07-21 15:06:57 +02:00
chriseth
9be5ed1220 Merge remote-tracking branch 'origin/develop' into breaking 2020-07-21 11:35:28 +02:00
a3d4
ecdfef1b30 Replace grave accent with acute accent 2020-07-21 00:18:47 +02:00
chriseth
10f93fbd8a
Merge pull request #9428 from ethereum/removeVar
Remove special treatment of ``var``.
2020-07-20 18:43:44 +02:00
Mathias Baumann
ba0a4de50d NatSpec: Implement `@inheritdoc` 2020-07-20 18:32:18 +02:00
chriseth
93c792c696 Remove special treatment of `var`. 2020-07-20 17:22:04 +02:00
Mathias Baumann
446d15488c Update tests for new public var override rules 2020-07-20 15:18:23 +02:00
chriseth
c8772a54c3 Constants are considered pure. 2020-07-20 15:18:23 +02:00
chriseth
d3647b13e4 Disallow public state variables overriding pure functions. 2020-07-20 15:18:23 +02:00
Mathias L. Baumann
69a596b0ff
Merge pull request #9418 from ethereum/stateMutForOverride
Issue state mutability restriction for overriding and not for virtual functions.
2020-07-20 15:01:25 +02:00
Leonardo Alt
2e1067a05a Set type properly for event parameters 2020-07-17 11:17:27 +02:00
chriseth
ba21d26f88
Merge pull request #9344 from ethereum/issue-3412
Allow overrides to have a more strict mutability than super
2020-07-16 18:50:51 +02:00
Mathias Baumann
dfffecfe2c Allow overrides to have a more strict mutability than super 2020-07-16 17:55:12 +02:00
chriseth
aa3f51ab47 Issue state mutability restriction for overriding and not for virtual functions. 2020-07-16 17:19:35 +02:00
chriseth
f945163909
Merge pull request #9432 from ethereum/develop
Merge develop into breaking.
2020-07-16 17:14:45 +02:00
Alex Beregszaszi
eab12ecf77 Nicer error message for private payable functions 2020-07-14 14:38:12 +01:00
chriseth
526e7b878b
Merge pull request #9403 from ethereum/string-tests
Add more tests for strings with unicode (escapes)
2020-07-14 13:49:06 +02:00
chriseth
f93932c259
Merge pull request #9406 from ethereum/fixSegfault
Fix segfault in oversized objects check in combination with var.
2020-07-14 13:30:33 +02:00
Daniel Kirchner
9c62ea182d Fix segfault in oversized objects check in combination with var. 2020-07-14 11:23:39 +02:00
chriseth
f28bede34a Refactor storageSizeUpperBound. 2020-07-14 10:45:02 +02:00
Harikrishnan Mulackal
f73b25bb78 Removed specialized errors related to constant state mutability 2020-07-14 12:42:47 +05:30
Alex Beregszaszi
950612cf42 Add more tests for strings with unicode (escapes) 2020-07-13 20:43:30 +01:00
Daniel Kirchner
c3e13b6733 Promote gwei to a proper keyword. 2020-07-13 18:07:11 +02:00
Daniel Kirchner
38c6ecbbe2 Remove finney and szabo denominations. 2020-07-13 18:07:10 +02:00
chriseth
cf189a3285
Merge pull request #9285 from ethereum/no_dot_in_asm
[BREAKING] Change _slot and _offset to use dot in inline assembly
2020-07-13 17:46:39 +02:00
chriseth
12f390a60a
Merge pull request #9326 from ethereum/eventOverwriting
[BREAKING] Disallow multiple events with same name and types.
2020-07-13 15:44:35 +02:00
chriseth
fc2e9ec2ff Use .slot and .offest to access storage items. 2020-07-13 14:59:22 +02:00
chriseth
8eee3ed3a2
Merge pull request #9388 from ethereum/develop
Merge develop into breaking.
2020-07-13 14:55:21 +02:00
chriseth
ab2f64f442 Disallow multiple events with same name and types. 2020-07-13 11:24:37 +02:00
a3d4
efc5ee207d Fix internal compiler error caused by oversized objects 2020-07-10 11:39:07 +02:00
Mathias Baumann
6b37f1c025 Remove visiblity of libraries in inherited contracts. 2020-07-09 16:38:29 +02:00
chriseth
9ef050af9a
Merge pull request #9373 from ethereum/develop
Merge develop into breaking.
2020-07-09 16:15:43 +02:00
a3d4
a068583bec Cover cmdlineTests.sh errors 2020-07-09 14:39:05 +02:00
chriseth
8eb459c825 Disallow dot in inline assembly identifiers. 2020-07-08 19:29:58 +02:00
chriseth
d4ecd33247 Propagate function call argument types across function call options. 2020-07-08 17:59:02 +01:00
chriseth
64b6524bdb Merge remote-tracking branch 'origin/develop' into breaking 2020-07-08 09:37:14 +02:00
chriseth
552d353430 New tests. 2020-07-07 12:16:18 +02:00
chriseth
5959d442cb Make visibility optional, but it has to be consistent. 2020-07-07 12:16:18 +02:00
chriseth
9743390a53 Update tests. 2020-07-07 12:16:18 +02:00
Alex Beregszaszi
beb4b1d563 Fix tests on breaking 2020-07-07 10:17:58 +01:00
chriseth
e48d3e5847 Fix wording of error message. 2020-07-06 19:22:52 +02:00
chriseth
982a269b2b
Merge pull request #9325 from ethereum/develop
Merge develop into breaking.
2020-07-06 19:11:02 +02:00
chriseth
a09a791999
Merge pull request #9313 from ethereum/doesnt
[Trivial] Replace "doesn't" with "does not" in error message
2020-07-06 18:21:02 +02:00
chriseth
f372ba6fea Constructors cannot have calldata parameters. 2020-07-06 16:52:51 +02:00
chriseth
375cb09341
Merge pull request #9316 from ethereum/yul-cleanup-evm
Tiny cleanups to EVMDialect in Yul
2020-07-06 16:14:24 +02:00
chriseth
ab68406006 Merge remote-tracking branch 'origin/develop' into breaking 2020-07-06 15:25:25 +02:00
a3d4
5e4aeaa460 Add variable name to the "Variable covers a large part of storage ...." message 2020-07-06 13:49:09 +02:00
Mathias Baumann
8cdf14f1b3 Replace "doesn't" with "does not" in error message 2020-07-06 13:44:33 +02:00