mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12545 from ethereum/yulGrammarFluke
Allow builtins in yul identifier paths in antlr grammar.
This commit is contained in:
commit
79e9d619a3
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
function() external g;
|
||||
assembly {
|
||||
g.address := 0x42
|
||||
g.selector := 0x23
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user