mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Support constant numbers in inline assembly.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
contract test {
|
||||
uint constant x = 1;
|
||||
function f() public {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
let y := x
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (107-108): Constant variables not supported by inline assembly.
|
||||
|
||||
@@ -7,4 +7,4 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (98-99): Constant variables not supported by inline assembly.
|
||||
// TypeError: (98-99): Constant variables cannot be assigned to.
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (112-120): Constant variables not supported by inline assembly.
|
||||
// TypeError: (112-120): The suffixes _offset and _slot can only be used on non-constant storage variables.
|
||||
|
||||
Reference in New Issue
Block a user