Daniel Kirchner
d71a023c0b
Use CycleDetector and account for multi-dimensional arrays.
2018-07-12 20:14:02 +02:00
Daniel Kirchner
d4dfd28694
Consider fixed size array members when checking for recursive structs.
2018-07-12 20:14:02 +02:00
chriseth
5d8a8f7265
Merge pull request #4437 from ethereum/report-empty-var-decls
...
[BREAKING] Report empty var tuple decls
2018-07-12 19:22:38 +02:00
Christian Parpart
cc585138bc
Generates a syntax error when declaring a variable declaration's LHS has no named components
2018-07-12 13:26:52 +02:00
Daniel Kirchner
a1f54f4e40
Require storage location.
2018-07-12 12:48:18 +02:00
chriseth
99bee7e233
Merge pull request #4443 from ethereum/double_var_decl_fix
...
Fix crash when declaring the same var twice in the same scope
2018-07-12 00:05:32 +02:00
Christian Parpart
08345209e6
Merge pull request #4404 from ethereum/v050-var-keyword-suggest
...
[WIP] v0.5.0 var keyword type suggestion
2018-07-11 16:33:09 +02:00
chriseth
f3abfa81ad
Merge pull request #4454 from ethereum/constructorArgCount
...
[BREAKING] Wrong argument count in constructor call
2018-07-11 14:45:05 +02:00
chriseth
238dbe1b99
Merge pull request #4388 from ethereum/noPackedLiterals
...
Disallow packed encoding of literals.
2018-07-11 14:28:20 +02:00
Erik Kundt
7c7e154a7b
Improves error with suggestion to remove parantheses.
2018-07-11 01:58:17 +02:00
Erik Kundt
34a031609e
Updates Changelog, syntax test and simplifies type checker.
2018-07-11 01:58:17 +02:00
Erik Kundt
0b960f5a9c
Turns wrong argument count in base constructor call into en error.
2018-07-11 01:56:07 +02:00
Cryptomental
140dbfdbd8
Code, Changelog, ReleaseChecklist: Fix typos.
...
Refs: #4442
2018-07-11 00:26:23 +02:00
chriseth
458a4c8aa5
Coding style.
2018-07-10 22:29:53 +02:00
Christian Parpart
1505e28b56
semantics: Suggest auto-deduced type when user declares variable with var
keyword.
2018-07-10 22:14:19 +02:00
chriseth
d84976dc87
Merge pull request #4376 from ethereum/fallbackExternal
...
Fallback functions have to be external
2018-07-10 21:39:25 +02:00
chriseth
12045d2e11
Merge pull request #4464 from cryptomental/bugfix/fix-typos-in-AsmParser-and-TypeChecker
...
AsmParser,TypeChecker: Fix typos.
2018-07-10 21:07:56 +02:00
chriseth
6567cd3e51
Merge pull request #4466 from ethereum/tupleNotEmpty
...
Disallow empty tuple components.
2018-07-10 21:03:30 +02:00
Leonardo Alt
cee4775a58
Add comment explaining new code
2018-07-10 18:54:46 +02:00
Leonardo Alt
c286cdaa62
Fix crash for double variable declaration in the same scope.
2018-07-10 18:54:46 +02:00
Christian Parpart
8ca69ed8d8
defaulting to v0.5.0 behaviour of unary + operator (disallow); also adapting all tests to it
2018-07-10 16:27:57 +02:00
chriseth
64abfd3e4a
Remove special `(x,)
` case from type assignment.
2018-07-10 15:58:46 +02:00
Daniel Kirchner
a6e5a51d61
Disallow empty tuple components.
2018-07-10 15:27:46 +02:00
chriseth
7650905567
Merge pull request #4415 from ethereum/uninitializedStoragePointer
...
[BREAKING] Turn uninitialized storage variables into error.
2018-07-10 15:24:01 +02:00
Cryptomental
a55abb550d
AsmParser,TypeChecker: Fix typos.
...
Fix typos. The change requested as a separate PR during codespell PR.
Adapt tests as well.
Refs: #4442
2018-07-10 12:33:19 +02:00
Daniel Kirchner
ece9afef8f
Check for matching number of components in TupleType::isImplicitlyConvertibleTo instead of the TypeChecker.
2018-07-10 12:17:01 +02:00
Daniel Kirchner
fe1d5da2a6
Turn uninitialized storage variables into an error.
2018-07-10 11:37:45 +02:00
Leonardo Alt
c1b67a845b
Enforce error on hex number combined with unit denomination
2018-07-09 17:19:41 +02:00
chriseth
f3e0bf1dd8
Merge pull request #4418 from ethereum/initialConstants
...
Only allow compile-time constants for constant state variables.
2018-07-05 17:07:32 +02:00
chriseth
4a332ab324
Merge pull request #4409 from ethereum/viewPureChecker
...
Enforce state mutability in view pure checker.
2018-07-04 14:09:46 +02:00
Leonardo Alt
8202d512e0
Enforcing error on msg.gas and block.blockhash()
2018-07-04 11:42:05 +02:00
Daniel Kirchner
7ea8365ab0
Remove v050 check for enforcing "view" in ViewPureChecker.
2018-07-04 10:14:58 +02:00
chriseth
8ed3da1d5f
Only allow compile-time constants for constant state variables.
2018-07-03 23:03:26 +02:00
chriseth
87241fd58c
Fallback function has to be external.
2018-07-03 22:51:36 +02:00
chriseth
533d5d4b1c
Merge pull request #4379 from ethereum/constructorArgsTwice
...
Disallow constructor arguments given multiple times.
2018-07-03 22:49:02 +02:00
Christian Parpart
1486d215b9
libsolidity: turns the var-keyword use from deprecation-warning to an error and include explicit type suggestion
2018-07-03 10:53:09 +02:00
chriseth
f7a9c4203e
Disallow packed encoding of literals.
2018-07-03 01:02:00 +02:00
Daniel Kirchner
9aefe2f118
Remove trailing whitespace in missing visibility warning.
2018-07-02 13:14:58 +02:00
chriseth
f69e24c85e
Disallow constructor arguments given multiple times.
2018-06-29 16:11:21 +02:00
chriseth
d469df45d8
Merge pull request #4352 from D-Nice/develop
...
Fixes storage ref var typo error from 'prefix' to 'suffix'
2018-06-29 12:27:29 +02:00
chriseth
4a842ecc82
Merge pull request #4097 from ethereum/noPackedExceptForPacked
...
[BREAKING] call only takes a single argument and does not pad
2018-06-27 18:29:01 +02:00
chriseth
92cb4acd8a
Also mention regular abi.encode in error message.
2018-06-27 15:00:34 +02:00
Alex Beregszaszi
80b7d36187
Remove non-0.5.0 warning for emit keyword (make it mandatory)
2018-06-26 20:00:54 +02:00
chriseth
5cf6fa84ac
Provide better suggestions in error messages with respect to call and hash functions.
2018-06-25 17:17:48 +02:00
D-Nice
b2f0d1db43
Fixes storage ref var typo error from 'prefix' to 'suffix'
2018-06-25 11:14:19 -04:00
chriseth
23c4142005
Bare functions take single bytes argument.
2018-06-25 17:01:45 +02:00
Alex Beregszaszi
6d9a091a8e
Keep the 'if it not used as an address' helper message for all cases of address related warnings
2018-06-25 16:25:21 +02:00
Alex Beregszaszi
48b003d4d4
Better wording for invalid address literal error
2018-06-25 16:17:50 +02:00
Jason Cobb
51567c0513
Change invalid (not exactly 160 bits long) address literal to error
2018-06-25 16:17:50 +02:00
Alex Beregszaszi
72e87423db
Disallow the years unit denomination properly
2018-06-21 20:21:02 +02:00
chriseth
32f2db780c
Merge pull request #4301 from rnaby/TypeChecker
...
Simplification of typeSupportedByOldABIEncoder
2018-06-21 18:53:31 +02:00
chriseth
0d1047181d
Merge pull request #4306 from ethereum/remove_050_workaround_scoping
...
[BREAKING] C99 scoping rules by default (remove 050 workaround)
2018-06-21 13:57:59 +02:00
Alex Beregszaszi
7e4bd3e346
Merge pull request #4219 from ethereum/functionTypeNamedArguments
...
Turn named return parameters in function types into an error.
2018-06-20 23:51:19 +02:00
Khan M Rashedun-Naby
a5f0caa178
Simplification of typeSupportedByOldABIEncoder
2018-06-20 23:16:21 +06:00
Leonardo Alt
8862b3092b
C99 scoping rules by default
2018-06-20 12:53:38 +02:00
Alex Beregszaszi
a17059573f
Disallow raw callcode (was deprecated in 0.4.12)
2018-06-19 19:31:07 +02:00
Daniel Kirchner
dbfee87860
Return parameters in function types may not be named.
2018-06-18 00:05:06 +02:00
Christian Parpart
a211b89118
Enforce disallowing empty structs
...
This patch enfoces an error when it encounters an empty struct,
effectively eliminating the deprecation warning.
Also adjust 419_interface_structs to explicitely test for (non-empty) structs,
as this behaviour "may" change in the future.
2018-06-14 00:24:43 +01:00
Alex Beregszaszi
9de45383d8
Disallow sha3/suicide aliases
2018-06-12 18:16:18 +01:00
Alex Beregszaszi
0f572159ec
Show named argument name in error
2018-06-06 15:59:27 +01:00
chriseth
283cdef98c
Fix view/pure error ordering problem.
2018-06-04 17:00:37 +02:00
mingchuan
b7cafcbdf9
Allow using calldata
keyword to specify data location
2018-05-30 18:05:55 +08:00
Daniel Kirchner
1cbc037a45
Update control flow graph.
2018-05-16 18:32:48 +02:00
Alex Beregszaszi
221a4d1f1f
Split warning for multi arguments for hash functions
2018-05-16 11:12:25 +02:00
chriseth
894122c508
Warn/enforce single bytes argument for certain builtins (hashing functions).
...
In 0.5.0 mode, only accept a single bytes argument for ``.call``,
``keccak256`` and others and do not pad when encoding.
2018-05-16 09:48:03 +02:00
chriseth
dac0029d16
ABI encoding functions are pure and should be usable in constants.
2018-05-15 14:45:54 +02:00
Daniel Kirchner
16e966dea0
Add control flow analyzer and test for uninitialized storage returns.
2018-05-14 20:23:40 +02:00
Daniel Kirchner
995623f0fa
Add control flow graph.
2018-05-14 20:23:40 +02:00
chriseth
fe12f05c08
Deprecate wildcard assignments.
2018-05-08 15:13:32 +01:00
chriseth
150d226603
Merge pull request #4063 from ethereum/emit-non-event
...
Show proper error when trying to emit a non-event
2018-05-04 15:02:04 +02:00
Alex Beregszaszi
ffe7f224a6
Show proper error when trying to emit a non-event
2018-05-04 12:47:01 +02:00
Alex Beregszaszi
b34428249a
Change numBits to unsigned IntegerType
2018-05-02 23:22:25 -07:00
chriseth
d1e1293fbd
Merge pull request #3981 from ethereum/years-suffix
...
The "year" denomination is deprecated
2018-04-24 12:12:03 +02:00
chriseth
e685f9f59e
Merge pull request #3976 from ethereum/emptyTupleComponent
...
Empty tuple components should not be possible
2018-04-23 17:35:00 +02:00
Alex Beregszaszi
1ac0090f31
The "year" denomination is deprecated
2018-04-23 16:19:51 +01:00
Erik Kundt
896018c8a3
Treats inline array as an error.
2018-04-23 17:11:41 +02:00
Erik Kundt
b2ff9bc88d
Turns it into warning (error for 0.5.0) and adds Changelog entry.
2018-04-23 17:09:42 +02:00
Erik Kundt
f2b58de92c
Prevents null type from being used in tuple.
2018-04-22 16:54:33 +02:00
Alex Beregszaszi
0493e3b053
Turn deprecated warnings for sha3/suicide into errors (experimental 0.5.0)
2018-04-20 17:40:48 +01:00
Alex Beregszaszi
069ea38916
Make literals an error for tight packing (experimental 0.5.0)
2018-04-20 11:58:16 +01:00
chriseth
a94945dfe4
Improve error message for failed member lookup.
2018-04-18 22:56:45 +01:00
chriseth
4895864302
Warn about functions named "constructor".
2018-04-18 21:23:09 +02:00
chriseth
29a97f1641
Fix name clashes between constructor and fallback function.
2018-04-18 14:24:35 +02:00
chriseth
d8030c9b2a
Merge pull request #3880 from ethereum/addressMemberDocAndWarn
...
Improve documentation and warning about accessing contract members in…
2018-04-16 11:05:05 +02:00
chriseth
95c49b367e
Merge pull request #3875 from ethereum/constructorSelfRef
...
Stricter check for "this" in constructor.
2018-04-13 18:39:31 +02:00
Daniel Kirchner
05c5ab19fb
Improve documentation and warning about accessing contract members inherited from address.
2018-04-13 18:26:24 +02:00
Daniel Kirchner
be37e3a912
Stricter check for member access to "this" in constructor.
2018-04-13 15:57:13 +02:00
chriseth
7054defdd6
Merge pull request #3364 from ethereum/revertWithReason
...
Revert with reason
2018-04-12 21:01:08 +02:00
chriseth
44416d1ac6
Merge pull request #2980 from ethereum/abi-api
...
Add abi.encode and abi.encodePacked
2018-04-12 20:55:03 +02:00
chriseth
75b8828666
Allow struct encoding with new encoder.
2018-04-12 16:37:16 +02:00
chriseth
ae1d040285
Allow error string for `require
`.
2018-04-12 13:09:37 +02:00
chriseth
8ab7dc036a
Register overload for `revert()
` that can receive a reason string.
2018-04-12 13:09:37 +02:00
chriseth
f00bb43593
Allow function overloads involving MagicVariableDeclarations.
2018-04-12 13:09:37 +02:00
chriseth
c3dc67d0e0
Merge pull request #3848 from ethereum/constantDivisionByZero
...
Error on invalid arithmetic with constant expressions.
2018-04-12 11:49:08 +02:00
chriseth
7343c40283
Check partial function parameters if rest is arbitrary.
2018-04-12 00:10:25 +02:00
Alex Beregszaszi
d56acb68ab
Add abi.encode, abi.encodePacked, abi.encodeWithSelector and abi.encodeWithSignature.
2018-04-11 22:32:10 +02:00
chriseth
2ad1acaf72
Warn if modifiers are applied to functions without implementation.
2018-04-11 22:00:21 +02:00
Daniel Kirchner
daa69df447
Error on invalid arithmetic with constant expressions.
2018-04-11 21:17:10 +02:00
Daniel Kirchner
cb548f6f53
Fix ConstantEvaluator to correctly handle single element tuples.
2018-04-11 18:30:34 +02:00
chriseth
c9bdbcf470
Merge pull request #3309 from ethereum/limit-errors
...
Limit the number of errors output in a single run to 256
2018-04-11 16:13:41 +02:00