Python: make compile

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-07-01 16:55:44 +02:00
parent 0175d5be0c
commit 0b11e77457
3 changed files with 5 additions and 10 deletions

View File

@@ -214,7 +214,10 @@ predicate compatibleTypes(DataFlowType t1, DataFlowType t2) {
any()
}
DataFlowType getErasedRepr(DataFlowType t) { result = t }
/**
* Gets the type of `node`.
*/
DataFlowType getNodeType(Node node) { result = TStringFlow() }
/** Gets a string representation of a type returned by `getErasedRepr`. */
string ppReprType(DataFlowType t) { result = t.toString() }

View File

@@ -54,13 +54,6 @@ class Node extends TNode {
result.getScope() = this.asEssaNode().getScope() // this allows ESSA var -> Cfg use
}
/**
* Gets an upper bound on the type of this node.
*/
DataFlowType getTypeBound() {
any()
}
/**
* Holds if this element is at the specified location.
* The location spans column `startcolumn` of line `startline` to

View File

@@ -105,8 +105,7 @@ uniqueEnclosingCallable
| test.py:161:1:161:17 | Exit node for Function test_truth | Node should have one enclosing callable but has 0. |
| test.py:161:1:161:17 | Exit node for Function test_truth | Node should have one enclosing callable but has 0. |
| test.py:161:5:161:14 | GSSA Variable test_truth | Node should have one enclosing callable but has 0. |
uniqueTypeBound
uniqueTypeRepr
uniqueType
uniqueNodeLocation
missingLocation
uniqueNodeToString