diff --git a/ql/src/semmle/go/dataflow/internal/DataFlowPrivate.qll b/ql/src/semmle/go/dataflow/internal/DataFlowPrivate.qll index a67e35873e7..db6f3651a4e 100644 --- a/ql/src/semmle/go/dataflow/internal/DataFlowPrivate.qll +++ b/ql/src/semmle/go/dataflow/internal/DataFlowPrivate.qll @@ -243,6 +243,15 @@ predicate isUnreachableInCall(Node n, DataFlowCall call) { int accessPathLimit() { result = 5 } +/** The unit type. */ +private newtype TUnit = TMkUnit() + +/** The trivial type with a single element. */ +class Unit extends TUnit { + /** Gets a textual representation of this element. */ + string toString() { result = "unit" } +} + /** * Gets the `i`th argument of call `c`, where the receiver of a method call * counts as argument -1.