Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reserve from and unsafe as keywords #7955

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Breaking changes:
* Commandline Interface: Add option to disable or choose hash method between IPFS and Swarm for the bytecode metadata.
* General: Disallow explicit conversions from external function types to ``address`` and add a member called ``address`` to them as replacement.
* General: Enable Yul optimizer as part of standard optimization.
* General: New reserved keywords: ``override``, ``receive``, and ``virtual``.
* General: New reserved keywords: ``from``, ``override``, ``receive``, ``virtual``, and ``unsafe``.
* General: ``private`` cannot be used together with ``virtual``.
* General: Split unnamed fallback functions into two cases defined using ``fallback()`` and ``receive()``.
* Inheritance: State variable shadowing is now disallowed.
Expand Down
2 changes: 1 addition & 1 deletion docs/060-breaking-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This section lists purely syntactic changes that do not affect the behavior of e
longer possible to resize storage arrays assigning a new value to their length. Use ``push()``,
``push(value)`` or ``pop()`` instead, or assign a full array, which will of course overwrite existing content.

* New reserved keywords: ``override``, ``receive``, and ``virtual``.
* New reserved keywords: ``from``, ``override``, ``receive``, ``virtual``, and ``unsafe``.

* The names of variables declared in inline assembly may no longer end in ``_slot`` or ``_offset``.

Expand Down
4 changes: 2 additions & 2 deletions docs/miscellaneous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,10 @@ Reserved Keywords
These keywords are reserved in Solidity. They might become part of the syntax in the future:

``abstract``, ``after``, ``alias``, ``apply``, ``auto``, ``case``, ``catch``, ``copyof``, ``default``,
``define``, ``final``, ``immutable``, ``implements``, ``in``, ``inline``, ``let``, ``macro``, ``match``,
``define``, ``final``, ``from``, ``immutable``, ``implements``, ``in``, ``inline``, ``let``, ``macro``, ``match``,
``mutable``, ``null``, ``of``, ``partial``, ``promise``, ``reference``, ``relocatable``,
``sealed``, ``sizeof``, ``static``, ``supports``, ``switch``, ``try``, ``typedef``, ``typeof``,
``unchecked``.
``unchecked``, ``unsafe``.

Language Grammar
================
Expand Down
2 changes: 2 additions & 0 deletions liblangutil/Token.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ namespace langutil
K(Default, "default", 0) \
K(Define, "define", 0) \
K(Final, "final", 0) \
K(From, "from", 0) \
K(Immutable, "immutable", 0) \
K(Implements, "implements", 0) \
K(In, "in", 0) \
Expand All @@ -266,6 +267,7 @@ namespace langutil
K(Typedef, "typedef", 0) \
K(TypeOf, "typeof", 0) \
K(Unchecked, "unchecked", 0) \
K(Unsafe, "unsafe", 0) \
\
/* Illegal token - not able to scan. */ \
T(Illegal, "ILLEGAL", 0) \
Expand Down