Repository: crytic/slither

Issue:
Add 0.8.8 support
https://blog.soliditylang.org/2021/09/27/solidity-0.8.8-release-announcement/

Most relevant:
- https://blog.soliditylang.org/2021/09/27/user-defined-value-types/
- min and max for Enums



Discussion:
Emphatic +1 here.

Support for user-defined value types into Slither would save me and my team considerable grief.
Need to support
```
contract test {
        enum MinMax { A, B, C, D }

        function min() public returns(uint) { return uint(type(MinMax).min); }
        function max() public returns(uint) { return uint(type(MinMax).max); }
}
```

Resolving patch:
diff --git a/slither/core/declarations/enum.py b/slither/core/declarations/enum.py
--- a/slither/core/declarations/enum.py
+++ b/slither/core/declarations/enum.py
@@ -9,6 +9,9 @@ def __init__(self, name: str, canonical_name: str, values: List[str]):
         self._name = name
         self._canonical_name = canonical_name
         self._values = values
+        self._min = 0
+        # The max value of an Enum is the index of the last element
+        self._max = len(values) - 1
 
     @property
     def canonical_name(self) -> str:
@@ -22,5 +25,13 @@ def name(self) -> str:
     def values(self) -> List[str]:
         return self._values
 
+    @property
+    def min(self) -> int:
+        return self._min
+
+    @property
+    def max(self) -> int:
+        return self._max
+
     def __str__(self):
         return self.name
diff --git a/slither/core/solidity_types/type_information.py b/slither/core/solidity_types/type_information.py
--- a/slither/core/solidity_types/type_information.py
+++ b/slither/core/solidity_types/type_information.py
@@ -13,8 +13,9 @@ class TypeInformation(Type):
     def __init__(self, c):
         # pylint: disable=import-outside-toplevel
         from slither.core.declarations.contract import Contract
+        from slither.core.declarations.enum import Enum
 
-        assert isinstance(c, (Contract, ElementaryType))
+        assert isinstance(c, (Contract, ElementaryType, Enum))
         super().__init__()
         self._type = c
 
diff --git a/slither/visitors/slithir/expression_to_slithir.py b/slither/visitors/slithir/expression_to_slithir.py
--- a/slither/visitors/slithir/expression_to_slithir.py
+++ b/slither/visitors/slithir/expression_to_slithir.py
@@ -9,6 +9,7 @@
     SolidityFunction,
     Contract,
 )
+from slither.core.declarations.enum import Enum
 from slither.core.expressions import (
     AssignmentOperationType,
     UnaryOperationType,
@@ -403,18 +404,25 @@ def _post_member_access(self, expression):
                     assert len(expression.expression.arguments) == 1
                     val = TemporaryVariable(self._node)
                     type_expression_found = expression.expression.arguments[0]
-                    assert isinstance(type_expression_found, ElementaryTypeNameExpression)
-                    type_found = type_expression_found.type
-                    if expression.member_name == "min:":
+                    if isinstance(type_expression_found, ElementaryTypeNameExpression):
+                        type_found = type_expression_found.type
+                        constant_type = type_found
+                    else:
+                        # type(enum).max/min
+                        assert isinstance(type_expression_found, Identifier)
+                        type_found = type_expression_found.value
+                        assert isinstance(type_found, Enum)
+                        constant_type = None
+                    if expression.member_name == "min":
                         op = Assignment(
                             val,
-                            Constant(str(type_found.min), type_found),
+                            Constant(str(type_found.min), constant_type),
                             type_found,
                         )
                     else:
                         op = Assignment(
                             val,
-                            Constant(str(type_found.max), type_found),
+                            Constant(str(type_found.max), constant_type),
                             type_found,
                         )
                     self._result.append(op)


Test patch:
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.8-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.8-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.8-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.8-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.8-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.8-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.8-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.8-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.9-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.9-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.9-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.9-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.9-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.9-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.9-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.6.9-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.0-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.0-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.0-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.0-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.0-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.0-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.0-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.0-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.1-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.1-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.1-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.1-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.1-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.1-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.1-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.1-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.2-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.2-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.2-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.2-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.2-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.2-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.2-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.2-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.3-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.3-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.3-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.3-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.3-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.3-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.3-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.3-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.4-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.4-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.4-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.4-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.4-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.4-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.4-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.4-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.5-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.5-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.5-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.5-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.5-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.5-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.5-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.5-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.6-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.6-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.6-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.6-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.6-legacy.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.6-legacy.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.6-legacy.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.7.6-legacy.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.0-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.0-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.0-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.0-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.1-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.1-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.1-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.1-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.10-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.10-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.10-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.11-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.11-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.11-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.12-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.12-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.12-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.2-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.2-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.2-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.2-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.3-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.3-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.3-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.3-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.4-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.4-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.4-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.4-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.5-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.5-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.5-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.5-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.6-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.6-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.6-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.6-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.7-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.7-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.7-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.7-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.8-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.8-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.8-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.9-compact.zip b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.9-compact.zip
Binary files a/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.9-compact.zip and b/tests/ast-parsing/compile/minmax-0.6.8.sol-0.8.9-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.10-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.10-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.11-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.11-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.12-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.12-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.13-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.13-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.13-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.14-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.14-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.14-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.15-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.15-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.15-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.8-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.8-compact.zip differ
diff --git a/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.9-compact.zip b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.9-compact.zip
new file mode 100644
Binary files /dev/null and b/tests/ast-parsing/compile/minmax-0.8.8.sol-0.8.9-compact.zip differ
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.8-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.8-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.8-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.8-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.8-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.8-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.8-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.8-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.9-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.9-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.9-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.9-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.9-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.9-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.9-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.6.9-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.0-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.0-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.0-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.0-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.0-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.0-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.0-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.0-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.1-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.1-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.1-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.1-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.1-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.1-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.1-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.1-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.2-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.2-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.2-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.2-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.2-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.2-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.2-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.2-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.3-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.3-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.3-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.3-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.3-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.3-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.3-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.3-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.4-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.4-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.4-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.4-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.4-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.4-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.4-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.4-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.5-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.5-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.5-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.5-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.5-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.5-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.5-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.5-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.6-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.6-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.6-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.6-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.6-legacy.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.6-legacy.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.6-legacy.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.7.6-legacy.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.0-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.0-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.0-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.0-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.1-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.1-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.1-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.1-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.10-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.10-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.10-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.10-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.11-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.11-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.11-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.12-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.12-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.12-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.2-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.2-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.2-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.2-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.3-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.3-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.3-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.3-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.4-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.4-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.4-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.4-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.5-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.5-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.5-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.5-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.6-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.6-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.6-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.6-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.7-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.7-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.7-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.7-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.8-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.8-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.8-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.9-compact.json b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.9-compact.json
--- a/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.9-compact.json
+++ b/tests/ast-parsing/expected/minmax-0.6.8.sol-0.8.9-compact.json
@@ -1,5 +1,3 @@
 {
-  "C": {
-    "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n"
-  }
+  "MinMax": {}
 }
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.10-compact.json b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.10-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.10-compact.json
@@ -0,0 +1,7 @@
+{
+  "MinMax": {
+    "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n",
+    "min()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n",
+    "max()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.11-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.11-compact.json
@@ -0,0 +1,7 @@
+{
+  "MinMax": {
+    "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n",
+    "min()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n",
+    "max()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.12-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.12-compact.json
@@ -0,0 +1,7 @@
+{
+  "MinMax": {
+    "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n",
+    "min()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n",
+    "max()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.13-compact.json b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.13-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.13-compact.json
@@ -0,0 +1,7 @@
+{
+  "MinMax": {
+    "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n",
+    "min()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n",
+    "max()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.14-compact.json b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.14-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.14-compact.json
@@ -0,0 +1,7 @@
+{
+  "MinMax": {
+    "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n",
+    "min()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n",
+    "max()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.15-compact.json b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.15-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.15-compact.json
@@ -0,0 +1,7 @@
+{
+  "MinMax": {
+    "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n",
+    "min()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n",
+    "max()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.8-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.8-compact.json
@@ -0,0 +1,7 @@
+{
+  "MinMax": {
+    "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n",
+    "min()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n",
+    "max()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.9-compact.json b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.9-compact.json
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/expected/minmax-0.8.8.sol-0.8.9-compact.json
@@ -0,0 +1,7 @@
+{
+  "MinMax": {
+    "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n",
+    "min()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n",
+    "max()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n"
+  }
+}
\ No newline at end of file
diff --git a/tests/ast-parsing/minmax-0.6.8.sol b/tests/ast-parsing/minmax-0.6.8.sol
--- a/tests/ast-parsing/minmax-0.6.8.sol
+++ b/tests/ast-parsing/minmax-0.6.8.sol
@@ -1,9 +1,13 @@
-contract C{
 
-    function f() public{
 
-        uint a = type(uint).max;
+contract MinMax {
+    uint a = type(uint).max;
+    uint b = type(uint).min;
 
-    }
+    int constant c = type(int).max;
+    int constant d = type(int).min;
+
+    uint8 immutable i =type(uint8).max;
+    uint8 immutable j = type(uint8).min;
 
 }
diff --git a/tests/ast-parsing/minmax-0.8.8.sol b/tests/ast-parsing/minmax-0.8.8.sol
new file mode 100644
--- /dev/null
+++ b/tests/ast-parsing/minmax-0.8.8.sol
@@ -0,0 +1,29 @@
+enum Enum { A, B, C, D }
+
+contract MinMax {
+    uint a = type(uint).max;
+    uint b = type(uint).min;
+    uint c = uint(type(Enum).min);
+    uint d =  uint(type(Enum).max);
+
+    int constant e = type(int).max;
+    int constant f = type(int).min;
+    uint constant g = uint(type(Enum).max);
+    uint constant h = uint(type(Enum).min);
+
+    uint8 immutable i;
+    uint8 immutable j;
+    uint immutable k;
+    uint immutable l;
+
+    constructor() {
+        i =  type(uint8).max;
+        j = type(uint8).min;
+        k =  uint(type(Enum).max);
+        l =  uint(type(Enum).min);
+    }
+
+    function min() public returns(uint) { return uint(type(Enum).min); }
+    function max() public returns(uint) { return uint(type(Enum).max); }
+}    
+
diff --git a/tests/test_ast_parsing.py b/tests/test_ast_parsing.py
--- a/tests/test_ast_parsing.py
+++ b/tests/test_ast_parsing.py
@@ -310,6 +310,10 @@ def make_version(minor: int, patch_min: int, patch_max: int) -> List[str]:
         "minmax-0.6.8.sol",
         make_version(6, 8, 9) + VERSIONS_07 + VERSIONS_08,
     ),
+    Test(
+        "minmax-0.8.8.sol",
+        make_version(8, 8, 15),
+    ),
     Test("dowhile-0.4.0.sol", VERSIONS_04),
     Test(
         "dowhile-0.4.5.sol",