-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathType2.ql
More file actions
29 lines (24 loc) · 572 Bytes
/
Copy pathType2.ql
File metadata and controls
29 lines (24 loc) · 572 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class OneTwo extends OneTwoThree {
OneTwo() {
this = 1 or this = 2
}
override string getAString() {
result = "One or two: " + this.toString()
}
}
class OneTwoThree extends int {
OneTwoThree() {
// characteristic predicate
this = 1 or this = 2 or this = 3
}
string getAString() {
// member predicate
result = "One, two or three: " + this.toString()
}
predicate isEven() {
// member predicate
this = 1
}
}
from OneTwoThree o
select o, o.getAString()