David Dzhalaev
79ffa16a61
Improve error message for contract size limit error
2021-10-27 20:06:53 +02:00
hrkrshnn
8815d6f5f0
Moved a check related to constants to TypeChecker
...
And added a proper error message when constant types containing (nested) mapping types are used.
2021-10-26 18:43:04 +02:00
hrkrshnn
51009c005d
Moved a canBeStored assert for struct members to TypeChecker
...
This is to avoid a assert from failing for forward declared user defined value types.
2021-10-26 18:43:04 +02:00
hrkrshnn
9428dbc94f
Moved storage size assert to TypeChecker from DeclarationTypeChecker
2021-10-26 18:43:04 +02:00
Christian Parpart
591ba184e9
Adds some more version pragma test cases.
2021-10-12 15:15:54 +02:00
Marenz
4368da0201
Fix ICE when printing an error message related to mappings
2021-10-06 17:02:36 +02:00
Marenz
98dd78362e
Add `.address
and
.selector
` in inside assembly for external function pointers
2021-10-04 18:05:57 +02:00
chriseth
d9ad047c21
Merge pull request #12001 from ethereum/cmdline-test-for-asm-json
...
Command-line test for `--asm-json`
2021-09-22 11:09:02 +02:00
Marenz
7a51acc5fe
Correct wrong error message referencing .slot
and .offset
when .length
was used
2021-09-21 18:28:38 +02:00
Kamil Śliwak
b1351f4807
Fix typo in test name: leave_items_on_tack.sol
-> leave_items_on_stack.sol
2021-09-21 16:28:16 +02:00
chriseth
4284499180
Merge pull request #11888 from ethereum/spdx-license-handling-10145
...
Properly detect multiple licenses and validate them.
2021-09-16 14:18:17 +02:00
Marenz
c81814915c
Properly detect multiple licenses and validate them.
2021-09-16 11:18:26 +02:00
hrkrshnn
15fb427a99
Added a multisource test for UserDefinedValueTypes and imports
...
Testing if `import {MyType} from "source";` works
2021-09-15 17:48:53 +02:00
hrkrshnn
48e16ceb88
Changing the UserDefinedValueType::toString to userdefined <name>
2021-09-15 17:25:23 +02:00
hrkrshnn
42c8310a63
Updated tests.
2021-09-15 12:56:29 +02:00
Daniel Kirchner
0fa24c786b
Merge pull request #11956 from ethereum/userDefinedTypesContractAccess
...
Allow accessing user defined value type members via contract name.
2021-09-14 17:14:04 +02:00
Daniel Kirchner
be29ef70a7
Allow accessing user defined value type members via contract name.
2021-09-14 16:24:14 +02:00
chriseth
8735d3fb6c
Merge pull request #11930 from ethereum/calldataStructInlineAssembly
...
Fix inline assembly assignments to calldata structs and statically-sized calldata arrays.
2021-09-14 16:16:48 +02:00
Daniel Kirchner
ab7b1625ac
Tests for unassigned calldata returns.
2021-09-13 15:22:46 +02:00
Harikrishnan Mulackal
8fafdeacac
Merge pull request #11939 from ethereum/userdefined-types-mapping-key
...
Allow Mapping keys to have type UserDefinedValueType.
2021-09-13 15:06:14 +02:00
hrkrshnn
a1d4d0125d
Allow UserDefinedValueType.uwrap (and wrap) as RHS of constant decl
...
Needed to make `MyType.unwrap` and `MyType.unwrap` as pure in the process. This change affected some
existing tests ("statement has no effect").
2021-09-13 11:53:05 +02:00
hrkrshnn
1fa6c71bd0
Allow Mapping keys to have type UserDefinedValueType.
...
Also added syntax and semantic test.
2021-09-13 10:03:49 +02:00
hrkrshnn
a03fbf7061
User defined value types: moved a syntax test to semantic test.
2021-09-09 12:07:51 +02:00
hrkrshnn
229f50eef1
Syntax checks for user defined value types
2021-09-08 19:56:48 +02:00
hrkrshnn
ce75790e8d
TypeChecker: added checks for wrap
and unwrap
...
For user defined value types and also added a test case.
2021-09-07 19:42:51 +02:00
hrkrshnn
0647039864
DeclarationTypeChecker for UserDefinedValueTypes
...
- Checks for repetitions.
- Assigns types.
- Checks if the 'actual type' is an elementary type name.
- Checks if the 'actual type' is a value type.
Also added tests.
2021-09-07 19:42:51 +02:00
hrkrshnn
9f7426b4a9
Implemented parsing for UserDefinedValueType
...
Also added parsing tests.
2021-09-07 19:42:51 +02:00
chriseth
9c2ab1ff2f
Merge pull request #11881 from ethereum/unsuable-symbol-11855
...
Properly export symbols from aliased imports.
2021-09-02 16:39:16 +02:00
Marenz
4700c2b973
Properly export symbols from aliased imports.
2021-09-01 19:55:30 +02:00
Marenz
2b28f87abf
Add type().min/max for enums
2021-09-01 15:02:02 +02:00
Kamil Śliwak
d07b796675
Disallow modifier declarations and definitions in interfaces
2021-08-31 15:25:08 +02:00
chriseth
f7916f2940
Add override exception for interface functions.
2021-08-31 10:45:31 +02:00
Marenz
121fd40f74
Allow reading of immutables during construction time
2021-08-19 13:59:05 +02:00
chriseth
a4c94a1b5b
Fixed inline assembly external identifier access.
2021-08-11 18:18:29 +02:00
hrkrshnn
892700d769
Tests for basefee as identifier in inline assembly
...
Also added basefee to `EVMVersion::hasOpcode(...)`
2021-08-11 10:46:40 +02:00
hrkrshnn
7f1a2be0fe
Allow basefee as Yul identifier for EVMVersion < london
...
This was done to prevent basefee from being a breaking change. This change will be removed in 0.9.0.
TODO revert this commit in breaking.
2021-08-11 10:46:08 +02:00
hrkrshnn
43605d9299
Tests and Changelog for basefee.
2021-08-11 09:51:12 +02:00
chriseth
eaac16c779
Merge pull request #11590 from ethereum/disallow-non-hex-zero-and-fix-bytes32-literals-in-bytes-concat
...
Disallow non-hex zero literals and fix 32-byte hex literals in `bytes.concat()`
2021-06-29 16:34:26 +02:00
Kamil Śliwak
6a50d088a0
Fix ICE for 32-byte hex literals and zero literals in bytes.concat() by disallowing them
2021-06-29 14:48:42 +02:00
Kamil Śliwak
fa3696878b
Fix crash when passing empty strings to bytes.concat()
2021-06-29 13:52:01 +02:00
Kamil Śliwak
ca0b1bf3f3
Fix crash when passing zero to bytes.concat()
2021-06-25 21:26:28 +02:00
chriseth
c5923f7fcf
Prevent calls to unimplemented modifiers.
2021-06-22 17:08:28 +02:00
Kamil Śliwak
98e83303b1
Remove assertions preventing calldata->calldata conversion when cleanup is needed
2021-06-22 16:10:16 +02:00
chriseth
5b4a2f66e1
Directly restart processing calling functions.
2021-06-14 13:54:05 +02:00
chriseth
e5500b9f20
Merge pull request #11471 from ethereum/funcdef-unimplemented-modifier
...
Reports an error on unimplemented modifiers in a function definition.
2021-06-09 13:54:05 +02:00
Christian Parpart
a14ac1923d
Fixes ICE when overriding an implemented modifier with an unimplemented one.
2021-06-09 13:15:20 +02:00
Kamil Śliwak
362fc6650d
Extra tests for shadowing within function parameter lists
2021-06-09 12:37:12 +02:00
a3d4
f59145f21f
Fix shadowing struct types by struct member names
2021-06-09 12:37:11 +02:00
a3d4
70b8b1c834
Do not warn about shadowing parameters in functions without implementation
2021-06-09 12:35:26 +02:00
Mathias Baumann
001a25db95
Fix crash in ControlFlowGraph related to free functions.
2021-06-09 11:10:33 +02:00