Commit Graph

734 Commits

Author SHA1 Message Date
Mathias Baumann
de98e38b78 Prepare code to output errors returned by isImplicitlyConvertibleTo() 2019-03-05 10:44:36 +01:00
chriseth
9a949c1bda Set default EVM version to Petersburg. 2019-03-04 14:53:00 +01:00
Alex Beregszaszi
ecd246aeb6 Support petersburg in evmVersion 2019-03-04 14:10:41 +01:00
chriseth
ab33ff1408
Merge pull request #6132 from ethereum/ossfuzz-nullref-typechecker
TypeChecker: Check if type exists before dereferencing it
2019-02-28 16:38:54 +01:00
Mathias Baumann
50b4193705 TypeChecker: Check if type exists before dereferencing it 2019-02-28 15:49:15 +01:00
Mathias Baumann
f782125463 Fix SMT Checker crash due to missing type information 2019-02-28 11:55:45 +01:00
Mathias Baumann
e4a52aa2f6 Allow dynamic types in public mappings 2019-02-26 15:48:54 +01:00
Alex Beregszaszi
d2f493268b Provide access to the name of contracts. 2019-02-26 14:07:03 +00:00
Erik Kundt
2d0daae796 Disallows index access on contracts and libraries. 2019-02-25 23:05:33 +00:00
Leonardo Alt
2405b2151a EVMVersion in langutil namespace instead of solidity 2019-02-25 15:29:57 +01:00
chriseth
7f5b335b47 Make EVM version part of EVM dialect. 2019-02-21 21:59:46 +01:00
Alex Beregszaszi
52496ea719 Proper error message for missing variables in inline assembly 2019-02-20 10:36:55 +00:00
Mathias Baumann
a63f7ca9df Fix crash due to missing type info 2019-02-19 17:28:44 +01:00
Alex Beregszaszi
2949bd14dd
Merge pull request #6028 from ethereum/warn-about-unused-struct-array-expr
Detect custom type expressions that have no effect
2019-02-18 21:12:04 +00:00
Mathias Baumann
e3d4155fa8 Detect custom type expressions that have no effect 2019-02-18 18:59:31 +01:00
Mathias Baumann
093b9ced97 Make sure "value" error hint is only displayed in the right context
Before, the hint would be shown for any "value" member, even a user-specified one.
2019-02-18 16:29:57 +01:00
chriseth
db7b38e3c4
Merge pull request #5978 from ethereum/fix-broken-hint
Fix error msg hint for non-payable contracts
2019-02-18 11:49:07 +01:00
Daniel Kirchner
809b9a95f9 Even more style checks. 2019-02-14 11:53:00 +01:00
Mathias Baumann
223dac3eca TypeChecker: Use cast instead of category() check 2019-02-14 11:39:51 +01:00
Mathias Baumann
10a9960eb3 Fix error msg hint for non-payable contracts 2019-02-14 11:39:19 +01:00
chriseth
f003696d7e
Merge pull request #5994 from ethereum/error-to-assert
Turn unreachable error into assert
2019-02-13 17:54:01 +01:00
chriseth
1a823f0bf8 Fix tabs/spaces. 2019-02-13 17:05:48 +01:00
Mathias Baumann
a70fee7316 Turn unreachable error into assert
The exact conditions are already checked when iterating over the
possibleMembers where the function `canTakeArguments()` is called
for each member. The function does the identical check.
2019-02-13 16:51:05 +01:00
Daniel Kirchner
9e32aa7510 Disallow calldata arrays with dynamically encoded base types in TypeChecker. 2019-02-11 17:13:12 +01:00
chriseth
92cb6cb793
Merge pull request #5936 from ethereum/calldataStructsV2
ABIEncoderV2: Implement calldata structs without dynamically encoded members.
2019-02-11 16:18:27 +01:00
Mathias Baumann
259d803387 Conditional Expression: Delay invalid type fatal error
Check the whole conditional first and then output errors for
both, the true and false expressions.
2019-02-11 15:47:19 +01:00
Daniel Kirchner
0e4912a203 ABIEncoderV2: Implement calldata structs without dynamically encoded members. 2019-02-11 15:46:58 +01:00
chriseth
b5a2c66771
Merge pull request #5957 from ethereum/function-param-fix
Ensure function parameter names always matches parameter types length
2019-02-11 15:45:28 +01:00
Mathias Baumann
66b24225fb Remove duplicate if-check 2019-02-11 14:56:57 +01:00
Mathias Baumann
fe2429de9f Packed Encoding: Disallow types in v2 that aren't allowed in v1 2019-02-11 11:37:48 +01:00
chriseth
a8d0ef4bad Allow indexed structs in events with encoder v2. 2019-02-11 11:37:47 +01:00
Mathias Baumann
57c1c8b46c Ensure function parameter names always matches parameter types length 2019-02-11 10:57:57 +01:00
Mathias Baumann
5fb79f5e37 Turn unreachable error statements into asserts 2019-02-07 10:07:09 +01:00
Mathias Baumann
9f431339ef Fix crash for too large struct array indicies 2019-02-06 11:50:25 +01:00
Mathias Baumann
77f407d450 Fix check that mappings can only have storage location 2019-02-05 18:06:42 +01:00
Daniel Kirchner
610ef9f199 Disallow calldata structs. 2019-01-21 10:30:57 +01:00
Alex Beregszaszi
7b759866cb
Merge pull request #5817 from ethereum/refactoring
Refactoring in TypeChecker and ContractDefinition
2019-01-18 11:36:49 +00:00
Daniel Kirchner
b7a86a124d Refactor TypeChecker::visit(FunctionDefinition const&). 2019-01-18 12:12:23 +01:00
Daniel Kirchner
a766efc79f Add ContractDefinition::isInterface. 2019-01-18 12:11:35 +01:00
chriseth
2ec997e697
Merge pull request #5775 from ethereum/codeAccess
Provide access to code of contract types.
2019-01-18 00:16:06 +01:00
chriseth
4669b06ab4 Warn if type(..).runtimeCode is used with assembly in the constructor. 2019-01-17 20:36:48 +01:00
chriseth
0bfdaa500a Add code access dependency. 2019-01-17 20:36:48 +01:00
chriseth
2fcfb216b5 Syntax for meta type information. 2019-01-17 20:36:48 +01:00
Leonardo Alt
83e7233bb8 Change error message and add tests 2019-01-17 14:28:03 +01:00
Leonardo Alt
c96b760c47 Return TypeError is fixed point encoding is attempted. 2019-01-17 13:36:53 +01:00
Daniel Kirchner
0dfd4a726e Warn about unreachable code. 2019-01-10 10:36:50 +01:00
Christian Parpart
62fe57479e
make use of C++ = default constructor declarations as well as more non-static member initialization syntax. 2018-12-19 11:26:42 +01:00
Alex Beregszaszi
c2ec6d71b4 Add version pragma parsing to Parser 2018-12-18 15:02:35 +00:00
Leonardo Alt
36d8a98664 Sort includes in libsolidity/analysis 2018-12-17 12:35:16 +01:00
chriseth
87237281bf
Merge pull request #5630 from ethereum/warn_functions_empty_body
Supress unused var and state mut warnings for functions with empty body
2018-12-12 17:00:50 +01:00