-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathType3.ql
More file actions
38 lines (32 loc) · 778 Bytes
/
Copy pathType3.ql
File metadata and controls
38 lines (32 loc) · 778 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
30
31
32
33
34
35
36
37
38
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 or this = 4
}
string getAString() {
// member predicate
result = "One, two or three: " + this.toString()
}
predicate isEven() {
// member predicate
this = 1
}
}
class TwoThree extends OneTwoThree {
TwoThree() {
this = 2 or this = 3
}
override string getAString() {
result = "Two or three: " + this.toString()
}
}
from OneTwoThree x
select x, x.getAString()