File tree Expand file tree Collapse file tree 4 files changed +39
-2
lines changed
semanticTests/inlineAssembly
syntaxTests/inlineAssembly Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,9 @@ bool EVMVersion::hasOpcode(Instruction _opcode) const
46
46
return hasChainID ();
47
47
case Instruction::SELFBALANCE:
48
48
return hasSelfBalance ();
49
+ case Instruction::BASEFEE:
50
+ return hasBaseFee ();
49
51
default :
50
52
return true ;
51
53
}
52
54
}
53
-
Original file line number Diff line number Diff line change @@ -118,7 +118,9 @@ done < <(
118
118
grep -v -E ' literals/.*_direction_override.*.sol' |
119
119
# Skipping a test with "revert E;" because ANTLR cannot distinguish it from
120
120
# a variable declaration.
121
- grep -v -E ' revertStatement/non_called.sol'
121
+ grep -v -E ' revertStatement/non_called.sol' |
122
+ # Skipping a test with "let basefee := ..."
123
+ grep -v -E ' inlineAssembly/basefee_berlin_function.sol'
122
124
)
123
125
124
126
YUL_FILES=()
Original file line number Diff line number Diff line change
1
+ contract C {
2
+ function f () public view returns (uint ret ) {
3
+ assembly {
4
+ let basefee := sload (0 )
5
+ ret := basefee
6
+ }
7
+ }
8
+ function g () public pure returns (uint ret ) {
9
+ assembly {
10
+ function basefee () -> r {
11
+ r := 1000
12
+ }
13
+ ret := basefee ()
14
+ }
15
+ }
16
+ }
17
+ // ====
18
+ // compileViaYul: also
19
+ // EVMVersion: <=berlin
20
+ // ----
21
+ // f() -> 0
22
+ // g() -> 1000
Original file line number Diff line number Diff line change
1
+ contract C {
2
+ function f () public view returns (uint ret ) {
3
+ assembly {
4
+ let basefee := sload (0 )
5
+ ret := basefee
6
+ }
7
+ }
8
+ }
9
+ // ====
10
+ // EVMVersion: =london
11
+ // ----
12
+ // ParserError 5568: (98-105): Cannot use builtin function name "basefee" as identifier name.
You can’t perform that action at this time.
0 commit comments