Nikola Matic
3bab14747e
Fix hidden-overload in Types and remove CMake hack
2023-05-09 19:33:23 +02:00
Kamil Śliwak
34da6c8811
Remove the inaccurate Type::categoryName() and change the error message for invalid calls to one independent of the category
2023-04-20 13:50:22 +02:00
Kamil Śliwak
293690e5a4
Add util::capitalized() and Type::categoryName()
2023-04-04 17:30:37 +02:00
wechman
5b03c13f90
User-defined operators: Analysis
2023-02-22 00:39:25 +01:00
Daniel
f441e1323a
Merge pull request #13384 from zemse/develop
...
Allow named parameters in mapping types
2023-01-09 17:59:29 +01:00
Saw-mon-and-Natalie
e295964f50
fixed some comments in Types.h
2022-12-16 14:58:41 +00:00
Soham Zemse
fa78e0f3d4
feat: allow named parameters in mapping types
...
Co-authored-by: Hari <webmail.hari@gmail.com>
test: add parser and abi test cases
docs: add example on using named parameters for mappings
- Add changelog
feat: update antlr grammar to allow named parameters in mappings
fix: prevent conflicting mapping parameter names
ref: change order of mapping initializers
test: update expectations and fix build
test: add more tests
fix: use common error & code for conflicting params
fix: issue with accessing nested mapping
test: add conflicting params tests for more nested levels
Update libsolidity/analysis/DeclarationTypeChecker.cpp
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
fix: error reported with the same code twice
test: add more tests for 3 level nested mapping
Address review comments
2022-12-08 11:56:58 +01:00
wechman
64a4f32bc2
Consistent terminology for attached/bound functions
2022-12-07 19:31:41 +01:00
wechman
cf3bae0839
Fix "slot" access via mapping reference in assembly
2022-08-17 07:53:52 +02:00
Duc Thanh Nguyen
e0ba7ef0d3
Rename _short in toString to _withoutDataLocation
2022-07-06 10:49:58 -04:00
Duc Thanh Nguyen
0a14368315
Display human readable type name in conversion error message
2022-07-06 10:49:51 -04:00
Ryan
4b7ed2d47a
Display human readable type name in conversion error message
2022-06-08 18:23:51 +05:30
chriseth
7bd6cba79c
Provide generic access to type definition for user-defined types.
2022-03-09 10:41:57 +01:00
nishant-sachdeva
276851ff91
Added support for FunctionType::Kind::StringConcat and functions string.concat
2022-02-10 22:08:47 +05:30
nishant-sachdeva
e85bceb417
Types.h:872 had a comment /// String is interpreted as a subtype of
...
Bytes. - this was now incorrect after #12593 . That has been removed
now.
2022-02-04 15:49:08 +05:30
nishant-sachdeva
cc6344c03c
Changed instaces of isByteArrayOrString() to isByteArray() where it's only supposed to return a True for Bytes Type
2022-02-02 17:05:26 +05:30
nishant-sachdeva
9043621747
Changed occurences of isByteArray() to isByteArrayOrString(). The idea
...
is to, in a future commit, replace such occurences of
isByteArrayOrString() which are required to return True only for Bytes
type with a new isByteArray() function.
2022-02-02 14:19:58 +05:30
Marenz
0004ad8764
Fix ICE when a constant variable declaration forward references a struct
2022-01-17 13:24:14 +01:00
chriseth
7620bfaad8
Add option member for function type.
2021-12-23 12:05:18 +01:00
chriseth
f94279a437
Use options struct for function type factory function.
2021-12-23 12:05:14 +01:00
chriseth
4fa8eee683
Use function names instead of members.
2021-12-23 11:55:33 +01:00
Marenz
7a96953e78
Implement typechecked abi.encodeCall()
2021-12-16 17:35:58 +01: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
Marenz
4368da0201
Fix ICE when printing an error message related to mappings
2021-10-06 17:02:36 +02:00
hrkrshnn
6109b5c3a1
UserDefinedValueType.storageBytes() is correctly set
...
Previously it returned 32 bytes for all types, which was wasteful. This commit changes it to return
the storage bytes of the underlying type.
2021-09-29 11:41:47 +02:00
chriseth
1531863835
Split Common.h into Numeric.h.
2021-09-23 15:27:29 +02:00
hrkrshnn
15452371d4
Types for UserDefinedValueType
2021-09-07 19:42:51 +02:00
Marenz
2b28f87abf
Add type().min/max for enums
2021-09-01 15:02:02 +02:00
Kamil Śliwak
1d1d74bd0e
RationalNumberType: Fix wrong docstring about m_compatibleBytesType being used for explicit conversions
2021-06-29 13:27:21 +02:00
Djordje Mijovic
f0c5cdca9f
[Sol->Yul] Adding util function to copy literal to storage.
...
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
Co-authored-by: chriseth <chris@ethereum.org>
2021-05-05 11:33:03 +02:00
Djordje Mijovic
b40c3bcc32
Allowing conversion from bytes to bytesNN in type checker.
2021-04-23 13:19:19 +02:00
chriseth
b04b189959
Syntax for custom errors.
2021-03-30 21:15:18 +02:00
Djordje Mijovic
1493326e48
Adding bytes.concat function type.
2021-03-24 11:49:21 +01:00
Mathias Baumann
e197ebbdd1
Replace TypePointer
with Type const*
2021-03-23 11:47:19 +01:00
Kamil Śliwak
e87cd0afdf
Check that there is an interface type before querying validity of location.
2021-02-24 11:22:40 +01:00
Alexander Arlt
ae6996efc1
Fix issue with pop on storage array.
2021-02-23 14:26:55 +01:00
chriseth
c91cffa4ec
Fix module member names for importing with renaming.
2021-02-23 13:15:32 +01:00
Christian Parpart
9ca389d6cd
MemberList.Member's last argument (declaration) made mandatory to avoid accidental missing out during construction.
2021-02-11 10:46:14 +01:00
chriseth
806453aca9
Merge remote-tracking branch 'origin/develop' into breaking
2020-12-08 21:00:09 +01:00
Alex Beregszaszi
7e88ba8da0
Enable the -Wconversion warning
2020-12-08 16:45:24 +00:00
Christian Parpart
c5d172c058
Reimplement constant evaluator.
2020-12-04 15:14:25 +01:00
chriseth
a0a02f2307
Merge remote-tracking branch 'origin/develop' into breaking
2020-11-23 19:28:08 +01:00
chriseth
f87edb6efc
Bound functions.
2020-11-23 18:58:23 +01:00
chriseth
bfc8e26007
Remove low-level log functions.
2020-10-22 17:50:14 +02:00
Mathias Baumann
8584c98b6a
Add annotation field `requiresVirtualLookup
`
2020-09-28 17:36:23 +02:00
a3d4
6b77a20134
Introduce CompositeType
2020-09-21 16:18:04 +02:00
Alex Beregszaszi
6fe8e63eee
Remove inconsistently used isValidUTF8 helper
2020-07-27 18:21:17 +01:00
Djordje Mijovic
e7d5a7da10
[TypeChecker] Remove function input and return parameter names from mobileType
2020-07-23 14:39:49 +02:00
chriseth
9be5ed1220
Merge remote-tracking branch 'origin/develop' into breaking
2020-07-21 11:35:28 +02:00
Sachin Grover
b7adb2aa42
Add SPDX license identifier if not present already in source file
...
Fixes : #9220
2020-07-17 20:24:12 +05:30