Commit Graph
416 Commits
Author SHA1 Message Date
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
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
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 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
Leonardo Alt 36d8a98664 Sort includes in libsolidity/analysis 2018-12-17 12:35:16 +01:00
chriseth fb3a0ac1c7 Codegen for object access. 2018-12-11 19:24:44 +01:00
Yi Huang 81f703427e Add tests for implcit conversions from literals to fixed-point numbers. 2018-12-10 17:31:20 +01:00
Erik Kundt b2afb8cdda Adds an additional message to failing type conversions. 2018-12-07 11:55:53 +01:00
chriseth 99db4e3ff4 Introduce the concept of builtin functions. 2018-12-04 12:06:33 +01:00
chriseth 33d6a24c47 Move library related checks. 2018-11-30 16:30:20 +01:00
chriseth 4f992298c6 Move hash collisions checks. 2018-11-30 16:30:19 +01:00
chriseth 6d1644e55c Move external type clash check. 2018-11-30 16:30:19 +01:00
chriseth 4f4f623273 Move fallback function checks. 2018-11-30 16:30:19 +01:00
chriseth 2a85152463 Move constructor checks. 2018-11-30 16:30:19 +01:00
chriseth d1cc731843 No need to visit structs early. 2018-11-30 16:30:19 +01:00
chriseth 2c2c976697 Move base constructor argument checks. 2018-11-30 16:30:19 +01:00
chriseth 57a62429c9 Move abstract function check. 2018-11-30 16:30:19 +01:00
chriseth 89cf6a5a38 Move override checks. 2018-11-30 16:30:19 +01:00
chriseth d054a3b85d Move duplication checks. 2018-11-30 16:30:19 +01:00
chriseth c445e7dfa4 Disallow inline arrays of mapping type. 2018-11-29 19:45:06 +01:00
Leonardo Alt 67bbcefe6c Report deprecation error on functions sha3 and suicide also without call. 2018-11-29 14:29:13 +01:00
hydai 9326adc3db Replace IntegerType(256) with static function IntegerType::uint256() 2018-11-29 17:07:18 +08:00
chriseth b4086ac870 Merge pull request #5526 from ethereum/fixGetterNewCoder
Fix: Disallow structs in getters for old encoder.
2018-11-28 17:05:52 +01:00
chriseth 46f3da0b87 Properly check getter types to be old-abi-coder-compatible. 2018-11-28 14:08:25 +01:00
chriseth 4fa47322f9 Remove obsolete comment. 2018-11-28 11:49:00 +01:00
chriseth 240ad0e34e Merge pull request #5382 from ethereum/libraryMappingPublic
Allow mapping arguments for public and external library functions.
2018-11-26 19:47:32 +01:00
chriseth 4d7799eed4 Properly disallow different return types for interface overloads with different visibilities. 2018-11-26 16:51:28 +01:00