From 4206739517778ebd48f0b676d01deec968091df4 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 10 Jan 2023 08:36:16 -0600 Subject: [PATCH] add test case --- .../top-level-0.8.8.sol | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/ast-parsing/user_defined_value_type/top-level-0.8.8.sol diff --git a/tests/ast-parsing/user_defined_value_type/top-level-0.8.8.sol b/tests/ast-parsing/user_defined_value_type/top-level-0.8.8.sol new file mode 100644 index 000000000..7021d3744 --- /dev/null +++ b/tests/ast-parsing/user_defined_value_type/top-level-0.8.8.sol @@ -0,0 +1,27 @@ +type Operand is uint256; +type StackTop is uint256; +struct StorageOpcodesRange { + uint256 pointer; + uint256 length; +} +struct IntegrityState { + // Sources first as we read it in assembly. + bytes[] sources; + StorageOpcodesRange storageOpcodesRange; + uint256 constantsLength; + uint256 contextLength; + StackTop stackBottom; + StackTop stackMaxTop; + uint256 contextScratch; + function(IntegrityState memory, Operand, StackTop) + view + returns (StackTop)[] integrityFunctionPointers; +} + +contract Test { + function set(StackTop stackTop_, uint256 a_) internal pure { + assembly { + mstore(stackTop_, a_) + } + } +} \ No newline at end of file