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
Alex Beregszaszi
2186401479
Remove duplicated check for unimplemented functions
2017-08-04 14:03:38 +01:00
Alex Beregszaszi
494dea262e
Show unimplemented function if trying to instantiate an abstract class
2017-08-04 14:03:37 +01:00
Alex Beregszaszi
c835bcec62
Replace isFullyImplemented with unimplementedFunctions in ASTAnnotations
2017-08-04 14:03:37 +01:00
Alex Beregszaszi
6d37f30d76
Rename Bare to Barecall
2017-08-01 10:47:10 +01:00
Alex Beregszaszi
9fc6eccc26
Add isFallback() helper
2017-07-27 21:52:57 +01:00
Alex Beregszaszi
53f747b7de
Merge pull request #2635 from ethereum/fixCrashOnAssignmentToNonLValue
...
Fix crash on assignment to non-LValue
2017-07-27 13:59:22 +01:00
chriseth
7c7c2baa82
Re-allow multiple modifiers per function.
2017-07-27 13:45:39 +02:00
chriseth
cb75e6218b
Fix crash on assignment to non-lvalue.
2017-07-26 14:32:25 +02:00
Alex Beregszaszi
e0dc74b895
Warn about shadowing variables.
2017-07-25 16:32:37 +02:00
Rhett Aultman
a2a759f792
Migrate over to ErrorReporter
2017-07-19 07:19:21 -07:00
Alex Beregszaszi
b3db1c361c
Warn if this is used in constructor
2017-07-19 06:47:36 -07:00
Alex Beregszaszi
033fc0cb1a
Include types in explicit conversion error message
2017-07-13 23:09:01 +02:00
Alex Beregszaszi
4229caaadc
Disable large arrays for memory location too
2017-07-13 22:47:35 +02:00
Alex Beregszaszi
cb4875a28b
Issue error properly for oversized arrays for calldata
2017-07-13 22:33:46 +02:00
Federico Bond
f20b150f38
Add type error when attempting value transfer to a non-payable contract
2017-07-12 23:57:53 -03:00
Alex Beregszaszi
db7ad508f8
Issue proper warning trying to access calldata variables in inline assembly
2017-07-12 10:48:44 +02:00
chriseth
883666d2c0
Fix invalid "explicit storage keyword" warning for reference members of structs.
2017-07-10 18:30:41 +02:00
chriseth
0400e61e28
Deprecate throw.
2017-07-05 21:15:00 +02:00
chriseth
dd34277ca6
Warn if local storage reference variable does not use "storage" explicitly.
2017-07-05 19:38:00 +02:00
Alex Beregszaszi
a46b3479bb
Remove parsing of why3 doc strings
2017-06-30 22:34:03 +01:00
chriseth
044058276e
Warn about callcode.
2017-06-30 16:37:32 +02:00
Alex Beregszaszi
06fe61f89b
Rename to isHexNumber()
2017-06-28 17:01:55 +01:00
Alex Beregszaszi
8b0c866f02
Add hasHexPrefix() to AST::Literal
2017-06-28 16:57:32 +01:00
chriseth
c3e5d6b7ef
Give min and max values in warning message.
2017-06-28 15:02:25 +02:00
chriseth
9f19bc8cbc
Warn if using var x = 0
2017-06-28 11:41:03 +02:00
chriseth
708d17d13f
Merge pull request #2464 from federicobond/deprecate-function-type-names
...
Warn deprecated usage of parameter names in function types
2017-06-27 16:32:48 +02:00
Federico Bond
70fd5c1770
Warn deprecated usage of parameter names in function types
2017-06-26 15:39:01 -03:00
chriseth
d0b6de0b34
Warn about copies in storage that might overwrite unexpectedly.
2017-06-26 16:31:36 +02:00
Alex Beregszaszi
a0b0df2d98
Merge pull request #2460 from ethereum/disallowMultiModifier
...
Disallow invoking the same modifier multiple times.
2017-06-26 11:51:12 +01:00
chriseth
f879489291
Merge pull request #2449 from federicobond/warn-bytesxx-decimal
...
Warn if decimal literals are used in a bytesXX context
2017-06-26 09:13:41 +02:00