Commit Graph

754 Commits

Author SHA1 Message Date
Mathias Baumann
cf35e5ba02 Issue warning for variables called super or this 2019-05-02 11:30:24 +02:00
chriseth
0bfd587363
Merge pull request #6527 from rocky/move-SemVerHandler
Move SemVerHandler to analysis to parsing to increase modularity...
2019-04-18 13:00:45 +02:00
rocky
b424446c5f Move SemVerHandler to analysis to parsing to increase modularity...
If ever you want to separate building analysis from scanning/parsing/ast, this will help.
2019-04-17 10:13:42 -04:00
Christian Parpart
721bf367a3
[libsolidity] TypeProvider: eliminate redundant "Type" suffix in provider function signatures. 2019-04-17 14:42:07 +02:00
Christian Parpart
862b65d6e3
[libsolidity] remove ReferenceType::copyForLocationIfReference (use TypeProvider instead) 2019-04-17 13:25:03 +02:00
Christian Parpart
b83097bdc6
[libsolidity] Types: eliminate redundant MagicType::metaType() (use TypeProvider instead) 2019-04-17 12:59:48 +02:00
Christian Parpart
58a45f2cb6 [libsolidity] TypeProvider: adds explicit uint256() accessor and removes default params in integerType(...). 2019-04-16 18:28:40 +02:00
Christian Parpart
a2a3b007f3 TypeProvider: storageType() to make all parameters explicit 2019-04-16 18:26:46 +02:00
Christian Parpart
bf43eebea9 libsolidity: Introducing TypeProvider API, for clear type system ownership. 2019-04-16 18:26:45 +02:00
chriseth
2308904f68 Remove "using namespace" from header and move Instruction to dev::eth. 2019-03-28 13:48:11 +01:00
Mathias Baumann
8e899a0d32 Disallow internal function types as parameters for public/external library function 2019-03-21 07:25:57 +01:00
Mathias Baumann
0fbea8a1a0 Change return type for interfaceType() to ResultType 2019-03-21 07:25:28 +01:00
Mathias Baumann
84b68006ba Fix function calls with named arguments for overloaded functions 2019-03-20 14:54:41 +01:00
Leonardo Alt
9acec99c31 Issue error for callvalue in nonpayable function 2019-03-19 20:45:27 +01:00
Mathias Baumann
4d060ef991 Merge interfaceType() canBeUsedExternally()
And cache the result for expensive calls.
2019-03-14 17:19:59 +01:00
Christian Parpart
cfefa2c1d1
Merge pull request #6136 from ethereum/yul-break-continue
[Yul] introduce break/continue keywords.
2019-03-11 20:38:57 +01:00
Daniel Kirchner
66fc7ffab2 Allow dynamically encoded calldata structs with ABIEncoderV2. 2019-03-11 16:40:13 +01:00
Christian Parpart
05e2d362c8 [Yul] Adds break/continue statements and some general tests for for-loop syntax. 2019-03-11 15:05:05 +01:00
Daniel Kirchner
f7c6eda2c3 Allow calldata arrays with dynamically encoded base type. 2019-03-06 18:04:12 +01:00
Mathias Baumann
9919670ddd Check base contracts for abi encoder compatibility 2019-03-06 11:16:54 +01:00
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