chriseth
54b6739962
Separate expression and statement.
2017-12-13 12:28:15 +01:00
chriseth
e7ed9d878e
Re-use commonType
2017-12-12 10:45:40 +01:00
chriseth
48c7ba72f3
Simplify ConstantEvaluator.
2017-12-12 09:44:18 +00:00
Alex Beregszaszi
7ff9a85592
Reduce the types of errors outputted by ConstantEvaluator
2017-12-12 09:40:29 +00:00
Alex Beregszaszi
5226d54ed1
Improve error message for constant evaluator
2017-12-12 09:39:26 +00:00
chriseth
2d171c25e5
Limit number of secondary source locations.
2017-12-12 10:27:28 +01:00
chriseth
9e36c189e5
Fix struct encoding warning for libraries.
2017-12-11 02:34:42 +00:00
Alex Beregszaszi
e9d256ddf4
Suggest the experimental ABI encoder if using structs as function parameters
2017-12-11 02:34:42 +00:00
Alex Beregszaszi
745eefa36f
Split Instruction and FunctionalInstruction in Julia
2017-12-05 14:52:11 +00:00
chriseth
19e067465a
Unary operators and division.
2017-11-30 01:20:21 +01:00
chriseth
6dbc34e16e
If statement for Iulia / inline assembly.
2017-11-22 16:25:24 +01:00
Alex Beregszaszi
455e51a608
Improve cyclic constant error message
2017-11-22 02:11:22 +00:00
Balajiganapathi S
d102deaec9
Detect cyclic constant definitions
2017-11-22 02:07:56 +00:00
Balajiganapathi S
165857b1d4
Allow constant integer variables as array lengths.
2017-11-22 01:41:46 +00:00
Alex Beregszaszi
1d5dd909b4
Do not try to display checksummed address for too-short/long address literals
2017-11-17 00:46:45 +00:00
wadeAlexC
8a6692b2cf
Improves address literal checksum error message
2017-11-17 00:46:44 +00:00
Kwang Yul Seo
33664c04a8
Update outdated comments
...
_errors -> _errorReporter.
2017-11-16 00:28:41 +09:00
Kwang Yul Seo
f364529713
Fix a typo
...
A semicolon was mistakenly inserted where a string concatenation
operator was meant.
2017-11-14 21:50:09 +09:00
Alex Beregszaszi
3a8324266f
More detailed errors for invalid array lengths (such as division by zero).
2017-10-20 11:59:18 +01:00
Alex Beregszaszi
10677125ae
Turn usage of callcode into an error as experimental 0.5.0 feature
2017-10-19 02:20:30 +01:00
chriseth
8a8a71de84
Only check tuples for valid rational numbers if they have more than one element.
2017-10-17 19:14:49 +02:00
Alex Beregszaszi
c99d2aae04
Validate each tuple literal
2017-10-17 18:59:01 +02:00
Alex Beregszaszi
c45e55675c
Force interface functions as external (0.5.0)
2017-10-06 13:48:38 +01:00
Alex Beregszaszi
ed62b2583c
Use the proper error reporting interface in ConstantEvaluator
2017-10-05 20:17:54 +01:00
Alex Beregszaszi
81519845bc
Require location keyword for local variables (0.5.0)
2017-10-05 19:02:30 +01:00
Federico Bond
76d3d24842
Do not consider shadowing in variable names inside event declarations
2017-10-04 13:30:26 -03:00
wadeAlexC
73f17876e9
Better error message when using fractional number as array size expressions
2017-10-03 22:01:58 +01:00
Federico Bond
2b82352692
Disallow non-pure constant state variables in 0.5.0
2017-10-03 15:30:16 +01:00
Federico Bond
1e7b6875b7
Extract duplicate function or event finding logic
2017-09-29 19:45:56 -03:00
Federico Bond
6d95447955
Emit error when declaring event with same name and arguments twice
2017-09-29 19:17:31 -03:00
Rhett Aultman
e434437eb7
Unary + now a synax error (experimental 0.5.0)
...
The unary + was deprecated with a warning, but will be elevated to an
error in 0.5.0. This adds the syntax error for the 0.5.0 pragma, and
for a true 0.5.0 release we should consider removing the operator from
the parser.
2017-09-29 17:50:25 +01:00
Alex Beregszaszi
b1741b7735
Validate array length in type checker
2017-09-29 16:44:00 +01:00
Alex Beregszaszi
0dda5eeca3
Order GlobalContext entries
2017-09-27 11:19:53 +01:00
Alex Beregszaszi
82673b7b3f
Format GlobalContext for readability
2017-09-27 11:19:53 +01:00
chriseth
9c62647f19
Merge pull request #2978 from ethereum/infer-location
...
Report correct location for inferred types in packed encoding
2017-09-27 12:13:01 +02:00
Alex Beregszaszi
dcb61352f6
Report correct location for inferred types in packed encoding
2017-09-27 10:21:24 +01:00
Alex Beregszaszi
ee65ecfb3b
Ensure that address types are always declared as 160bit
2017-09-26 22:46:33 +01:00
chriseth
8af298ade3
Merge pull request #2902 from ethereum/warn-obsolete
...
Warn about obsolete sha3/suicide calls
2017-09-20 18:00:40 +02:00
Alex Beregszaszi
aad829948a
Ensure parameter names match between headers and implementation
2017-09-20 01:23:21 +01:00
Alex Beregszaszi
ed1fd49ab0
Warn about obsolete sha3/suicide calls
2017-09-19 11:11:19 +01:00
chriseth
ff275e369c
Allow constant byte arrays.
2017-09-18 19:49:27 +01:00
chriseth
3a9a9db6d6
Merge pull request #2910 from ethereum/fallback-restrict-external
...
Force fallback to be external (experimental 0.5.0 change)
2017-09-18 16:38:55 +02:00
Alex Beregszaszi
a3380ea8d0
Force fallback to be external (experimental 0.5.0 change)
2017-09-18 11:58:37 +01:00
chriseth
59ea19b3b9
Check for recursive structs.
2017-09-16 12:12:43 +01:00
Alex Beregszaszi
7dd372ce5c
Merge pull request #2904 from ethereum/viewPure5
...
Enforce view with error for experimental 0.5.0.
2017-09-14 18:13:56 +01:00
chriseth
24fd67b7db
Enforce view with error for experimental 0.5.0.
2017-09-14 17:53:43 +02:00
Alex Beregszaszi
5b5367dc12
Warn if no visibility is specified on contract functions.
2017-09-14 15:58:04 +01:00
chriseth
3f3bcc4f8a
Merge pull request #2848 from ethereum/checkViewPure
...
Enforce view and pure.
2017-09-13 18:29:13 +02:00
chriseth
e2f30ce9ca
Minor changes from review.
2017-09-13 17:29:27 +02:00
chriseth
66c01301fe
Rename to invalidInPureFunctions
2017-09-13 17:18:22 +02:00
Alex Beregszaszi
0259459b21
Limit each duplicate declaration error to 32 references
2017-09-12 21:37:06 +01:00
chriseth
5084a9cda9
Merge pull request #2852 from ssuman/develop
...
This commit will display warning when there is unused function parameter
2017-09-12 17:57:55 +02:00
Suman
10d290cb9b
Display helpful warning for unused function arguments/return parameters
2017-09-12 15:35:03 +01:00
Alex Beregszaszi
5ae9b8dab1
Do not report overload conflicts for every line excessively
2017-09-12 14:58:10 +01:00
Alex Beregszaszi
f2412da800
Merge pull request #2888 from ethereum/same-declaration-error
...
Use secondary source location as a vector in same declaration errors
2017-09-12 14:57:42 +01:00
Alex Beregszaszi
da1a53e02a
Use secondary source location as a vector in same declaration errors
2017-09-12 12:06:16 +01:00
Alex Beregszaszi
a03211f3c9
Show each unimplemented function in secondary source location
2017-09-12 10:59:56 +01:00
Alex Beregszaszi
a52e0de67c
Do not show the same error multiple times for events
2017-09-12 00:03:35 +01:00
chriseth
b756274357
Allow constant variables in pure functions.
2017-09-06 13:52:29 +02:00
chriseth
15bdc48a73
Rename and add anonymous namespace.
2017-09-06 13:52:29 +02:00
chriseth
c83768c426
Fix tests
2017-09-06 13:52:29 +02:00
chriseth
1a1db1ec96
Tone down error message.
2017-09-06 13:52:29 +02:00
chriseth
7886c24d40
Modifier invocation can be base constructor call
2017-09-06 13:52:29 +02:00
chriseth
d6861d909c
Analyze assembly.
2017-09-06 13:52:29 +02:00
chriseth
ec27e569b0
Do not report on overriding function and only warn for view.
2017-09-06 13:50:49 +02:00
chriseth
342367d5dc
Store super function.
2017-09-06 13:50:49 +02:00
chriseth
eacee5b25c
Remove previous warning about pureness not being enforced.
2017-09-06 13:50:49 +02:00
chriseth
5470da4d9a
View-pure checker.
2017-09-06 13:50:49 +02:00
Alex Beregszaszi
3326a2282e
Change array too large error message as it is valid for non-calldata too
2017-09-05 22:38:45 +01:00
Alex Beregszaszi
79e84a8fa4
Swap declaration/statemutability in FunctionType constructor
2017-08-28 19:43:35 +01:00
Alex Beregszaszi
aa94000a91
Mark all built in functions with appropriate statemutability
2017-08-28 19:43:35 +01:00
Alex Beregszaszi
f6dba97fe1
Warn on using literals in tight packing
2017-08-25 14:16:50 +01:00
Alex Beregszaszi
e03dfd8476
Remove unused statements from the Natspec headers
2017-08-25 13:15:08 +01:00
Alex Beregszaszi
5668377c72
Introduce pure specifier on functions
2017-08-24 13:46:18 +01:00
chriseth
7b0046a9aa
Check inheritance specifier arguments for interfaces.
2017-08-22 11:39:50 +01:00
Alex Beregszaszi
b25f0c52ac
Reject the creation of interface with the new statement
2017-08-21 23:02:18 +01:00
chriseth
ec82706396
Fix crash related to `using for
` without a library.
2017-08-21 16:57:37 +02:00
Alex Beregszaszi
fe25bcf350
Library cannot have constructors
2017-08-21 11:03:55 +01:00
Alex Beregszaszi
a61c88e9fe
Use state mutability in override error messages
2017-08-16 17:23:09 +01:00
Alex Beregszaszi
a2aaa47ee2
Use state mutability in fallback/constructor check
2017-08-16 17:23:09 +01:00
chriseth
3d595d4b14
Warn about shift of literals.
2017-08-16 13:54:28 +02:00
Alex Beregszaszi
b225bf5d53
Remove useless payable & constant typecheck
2017-08-14 14:21:47 +01:00
chriseth
4d9790b6d5
Merge pull request #2703 from ethereum/warnAboutLargeStorageArrays
...
Warn about large storage structures.
2017-08-14 11:37:01 +02:00
Federico Bond
3571db6e3f
Avoid duplicate errors due to function overrides
2017-08-11 22:45:26 +01:00
Federico Bond
d4997dd9a3
Use a secondary location for function override errors
2017-08-11 22:45:25 +01:00
Federico Bond
a6949851f3
Refactor function override check to remove duplicate logic
2017-08-11 22:45:25 +01:00
Federico Bond
ff5bb54e3c
Use fully qualified name of super in message
2017-08-11 22:45:25 +01:00
Federico Bond
a5ceaac8df
Improve override changes signature error message
2017-08-11 22:45:25 +01:00
chriseth
da3ac86403
Warn about large storage structures.
2017-08-11 20:57:57 +02:00
Alex Beregszaszi
57c2451130
Introduce ExperimentalFeatures header
2017-08-10 00:15:25 +01:00
Alex Beregszaszi
690ed37fd4
Reject wildcard and multiple experimental pragmas
2017-08-09 23:41:46 +01:00
Alex Beregszaszi
de9e758ef7
Reject unsupported experimental feature names
2017-08-09 23:41:46 +01:00
Alex Beregszaszi
e44da40835
Warn if using experimental pragma
2017-08-09 23:41:46 +01:00
Alex Beregszaszi
fbcc5f4ee5
Support experimental feature pragma
2017-08-09 23:41:46 +01:00
Alex Beregszaszi
8df89c5d5b
Disable unimplemented library functions instead
2017-08-08 12:42:10 +01:00
Alex Beregszaszi
1ada48f61e
Raise error when using unimplemented internal library functions.
2017-08-08 11:58:00 +01:00
Alex Beregszaszi
bb0eb57c2f
Constructors must be implemented if declared.
2017-08-04 20:38:45 +01:00
Alex Beregszaszi
a372941a44
Merge pull request #2687 from ethereum/show-unimplemented-funcs
...
Show unimplemented function if trying to instantiate an abstract class
2017-08-04 19:46:09 +01:00
chriseth
060d229a22
Search for shadowee starting from parent scope.
2017-08-04 19:06:24 +02:00
Alex Beregszaszi
32acadf43d
Do not mark overloaded functions as shadowing
2017-08-04 19:06:23 +02:00