Merge pull request #12545 from ethereum/yulGrammarFluke

Allow builtins in yul identifier paths in antlr grammar.
This commit is contained in:
Daniel Kirchner 2022-01-17 20:42:14 +01:00 committed by GitHub
commit 79e9d619a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Compiler Features:
Bugfixes:
* Antlr Grammar: Allow builtin names in ``yulPath`` to support ``.address`` in function pointers.
* Control Flow Graph: Perform proper virtual lookup for modifiers for uninitialized variable and unreachable code analysis.
* Immutables: Fix wrong error when the constructor of a base contract uses ``return`` and the parent contract contains immutable variables.
* TypeChecker: Fix ICE when a constant variable declaration forward references a struct.

View File

@ -564,7 +564,7 @@ yulFunctionDefinition:
* While only identifiers without dots can be declared within inline assembly,
* paths containing dots can refer to declarations outside the inline assembly block.
*/
yulPath: YulIdentifier (YulPeriod YulIdentifier)*;
yulPath: YulIdentifier (YulPeriod (YulIdentifier | YulEVMBuiltin))*;
/**
* A call to a function with return values can only occur as right-hand side of an assignment or
* a variable declaration.

View File

@ -0,0 +1,9 @@
contract C {
function f() public pure {
function() external g;
assembly {
g.address := 0x42
g.selector := 0x23
}
}
}