Skip to content

Commit 2d2b532

Browse files
owen-mcmbg
authored andcommitted
Delete more about alias types in downgrade script
1 parent 40c7540 commit 2d2b532

File tree

5 files changed

+61
-0
lines changed

5 files changed

+61
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class Type_ extends @type {
2+
string toString() { result = "Type" }
3+
}
4+
5+
// The schema for types and typename are:
6+
//
7+
// types(unique int id: @type, int kind: int ref);
8+
// objects(unique int id: @object, int kind: int ref, string name: string ref);
9+
from Type_ type, int object, int kind
10+
where
11+
objects(type, object) and
12+
types(type, kind) and
13+
kind != 40 // @typealias
14+
select type, object
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class Type_ extends @type {
2+
string toString() { result = "Type" }
3+
}
4+
5+
class Object_ extends @object {
6+
string toString() { result = "Object" }
7+
}
8+
9+
// The schema for types and typename are:
10+
//
11+
// types(unique int id: @type, int kind: int ref);
12+
// type_objects(unique int tp: @type ref, int object: @object ref);
13+
from Type_ type, Object_ object, int kind
14+
where
15+
type_objects(type, object) and
16+
types(type, kind) and
17+
kind != 40 // @typealias
18+
select type, object
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class Type_ extends @type {
2+
string toString() { result = "Type" }
3+
}
4+
5+
// The schema for types and typename are:
6+
//
7+
// types(unique int id: @type, int kind: int ref);
8+
// typename(unique int tp: @type ref, string name: string ref);
9+
from Type_ type, string name, int kind
10+
where
11+
typename(type, name) and
12+
types(type, kind) and
13+
kind != 40 // @typealias
14+
select type, name
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Type_ extends @type {
2+
string toString() { result = "Type" }
3+
}
4+
5+
// The schema for types is:
6+
//
7+
// types(unique int id: @type, int kind: int ref);
8+
from Type_ type, int kind
9+
where
10+
types(type, kind) and
11+
kind != 40 // @typealias
12+
select type, kind

go/downgrades/60e1b7912d7c68066b13c776b07c2da5fc13342a/upgrade.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ description: Remove support for type aliases
22
compatibility: full
33

44
alias_rhs.rel: delete
5+
types.rel: run types.qlo
6+
typename.rel: run typename.qlo
7+
type_objects.rel: run type_objects.qlo

0 commit comments

Comments
 (0)