900 Commits
Author SHA1 Message Date
Daniel Kirchner d68c526eaa Disallow external function pointers as immutables. 2020-04-03 11:56:51 +02:00
chriseth bdcfd71f34 Skip verification for external access. 2020-04-02 18:40:43 +02:00
hrkrshnn ef2bef9ddc Added error for interface function with modifiers; test case 2020-04-02 20:30:43 +05:30
Mathias Baumann ac7b31e559 Validate immutable variables 2020-04-02 13:52:27 +02:00
chriseth a2b427dc0b Merge pull request #8567 from ethereum/storage-pointer-checker
Removed redundant storage declaration check; test coverages
2020-04-02 13:46:51 +02:00
hrkrshnn 79387b2ada Removed redundant declaration check; changed relevant test cases 2020-04-02 12:27:38 +05:30
Alexander Arlt 3e649eb8e1 Disallow access to functions from inline assembly. 2020-04-01 10:34:55 +02:00
a3d4 c002cae691 Fix #8450. Prevented internal compiler errors when assigning nested tuples. 2020-03-31 03:25:26 +02:00
a3d4 339f3ca32c Fix #8427: Promoted typeError to fatalTypeError in ReferencesResolver::endVisit(UserDefinedTypeName). 2020-03-25 02:51:34 +01:00
iamdefinitelyahuman cae4b7dd0e fix typo in docstring error message 2020-03-22 17:15:44 +04:00
chriseth fa148f2483 Parsing of immutable state variable. 2020-03-12 17:11:24 +01:00
a3d4 a86c511713 Replaced "assert" with "if" (incorrect contract code is not supposed to trigger asserts). 2020-03-12 14:03:27 +01:00
a3d4 437ab3d24c Fixed ControlFlowBuilder compilation error. 2020-03-10 14:02:16 +01:00
Daniel Kirchner 809e3503ba Control flow analysis for inline assembly. 2020-03-09 16:23:10 +01:00
chriseth 37e01a19c0 Fix scoping following try/catch. 2020-03-09 13:14:13 +01:00
Daniel Kirchner 7f38cbb91d Fix calling unimplemented base function. 2020-03-06 10:51:16 +01:00
Djordje Mijovic 58c6b90705 Deprecated warning for .value() and .gas() on function and constructror calls 2020-03-04 12:51:49 +01:00
chriseth 45041e5d3a Allow access to `_slot` for local storage pointer variables. 2020-02-25 14:28:04 +01:00
chriseth c2e22d4cab Merge pull request #8221 from ethereum/structured-docs-error-locations
[parser] Source locations for structured documentation errors
2020-02-18 14:57:28 +01:00
Jason Cobb 6db0d50094 Don't use identifiers starting with an underscore followed by an uppercase letter 2020-02-17 12:44:39 -05:00
Erik Kundt b43751d65e Reports source location for structured documentation errors. 2020-02-14 15:21:39 +01:00
Daniel Kirchner 9f094d59b9 Mark function selector accesses as pure for pure expressions and mark function accesses via contract name as pure. 2020-02-14 12:33:33 +01:00
Mathias L. Baumann c635377450 Merge pull request #8313 from ethereum/checkFunctionsExistInIsoltest
Make type error fatal to prevent assert failure at later point
2020-02-13 16:08:13 +01:00
Mathias Baumann 8911b58a6d Make type error fatal to prevent assert failure at later point 2020-02-13 15:16:28 +01:00
Daniel Kirchner 45f80e9895 Move assertion in PostTypeChecker's ConstStateVarCircularReferenceChecker to account for function type variables 2020-02-12 17:42:27 +01:00
Daniel Kirchner 9c3151748e Move mapping key checks to ReferencesResolver and make them fatal. 2020-02-11 13:35:23 +01:00
a3d4 b3b8441aa4 Fix printing source for missing pragma. 2020-02-09 02:28:47 +01:00
Daniel Kirchner e07274a96f Disallow libraries as mapping keys. 2020-02-06 09:09:43 +01:00
Erik Kundt f2701db0aa Adds documentation for Solidity source upgrader. 2020-02-05 16:52:54 +01:00
chriseth 7cca036f4c Merge pull request #8224 from a3d4/refactor-sourcelocation
Replaced SourceLocation::isEmpty() with isValid() and hasText().
2020-02-04 22:23:51 +01:00
Daniel Kirchner d3cbfb0c5c Allow user-defined types as mapping keys in parser and restrict to contracts during type checking. 2020-02-04 17:22:03 +01:00
alex e4b18e85e6 Replaced SourceLocation::isEmpty() with isValid() and hasText().
The function SourceLocation::isEmpty() had somewhat dual role.
Sometimes it indicates that the SourceLocation is invalid.
Sometimes it means that there is no corresponding source text.

Hence the proposal is to replace it with two functions, isValid() and hasText().

I also removed Scanner::sourceAt(). (Do we have a rule of thumb to remove unused code?)

Since hasText() checks that start and end are valid indices for source, I adjusted a couple of tests to avoid empty source strings.
2020-02-03 08:04:21 +01:00
Erik Kundt ec27c2e507 Introduce AST node for structured documentation. 2020-01-30 18:25:56 +01:00
Mathias Baumann b8e2baf5f4 Use yul::AstWalker to resolve assembly symbols 2020-01-28 17:57:48 +01:00
Mathias Baumann a3f23d3158 Implement new with CREATE2 and function call options. 2020-01-23 21:20:01 +01:00
Jason Cobb 573a054d5d Prohibit interfaces inheriting from non-interfaces 2020-01-22 09:40:40 -05:00
Jason Cobb 1cc8ce1656 Don't prohibit interface inheritance 2020-01-22 09:40:40 -05:00
Daniel Kirchner ee5ff4df4e Clean up visibility via contract name and fix ICE on calling unimplemented base function. 2020-01-16 19:13:04 +01:00
Daniel Kirchner c450b18673 Remove remaining instances of new. 2020-01-15 17:25:08 +01:00
djudjuu e8556fa1b2 Ast-Import from standard-json 2020-01-14 17:15:53 +01:00
Daniel Kirchner 9535c0f520 Introduce FunctionKind::Declaration and allow accessing function signatures via contract name. 2020-01-09 15:40:41 +01:00
Mathias Baumann 2179562785 Move variables-in-interfaces checker to PostTypeChecker
refs #7566
2020-01-08 14:05:08 +01:00
Mathias Baumann 21844aa545 Move event-outside-emit check to PostTypeChecker
refs #7566
2020-01-08 14:05:08 +01:00
Mathias Baumann 9f8d49e358 Move modifier context check to PostTypeChecker
refs #7566
2020-01-08 14:05:08 +01:00
chriseth 5ca3abd7cb Merge pull request #8106 from random-internet-cat/move-contract-kind
Move ContractKind from ContractDefinition to file-scope
2020-01-08 13:06:26 +01:00
Christian Parpart 345f9928ab Library libdevcore renamed to libsolutil. 2020-01-07 15:51:50 +01:00
Christian Parpart 6b23412fae C++ namespace cleanup (except tests). 2020-01-07 15:51:50 +01:00
Jason Cobb 529405deb6 Move ContractKind from ContractDefinition to file-scope 2020-01-07 09:11:29 -05:00
Mathias L. Baumann 20cf9d9fef Merge pull request #8038 from ethereum/statless-typechecker-7566
Refactor PostTypeChecker into multiple classes per usecase
2020-01-06 14:39:58 +01:00
chriseth ece6463f56 Merge pull request #8069 from random-internet-cat/set-scope
Move scope of Scopable into new ScopableAnnotation
2019-12-20 08:22:36 +01:00