Add Unit class to DataFlowPrivate

This commit is contained in:
Owen Mansel-Chan
2021-02-17 16:42:17 +00:00
parent 4f55ecc995
commit 24d35c35a1

View File

@@ -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.