Skip to content

Commit 3709b1b

Browse files
committed
Add examples of go to definition, and go to type definition, for types.
1 parent d07fa83 commit 3709b1b

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

analysis/tests/src/Cross.res

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ let typeDef = {TypeDefinition.item: "foobar"}
3131

3232
let _ = DefinitionWithInterface.y
3333
// ^def
34+
35+
type defT = DefinitionWithInterface.t
36+
// ^def
37+
38+
type defT2 = DefinitionWithInterface.t
39+
// ^typ
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
let y = 4
22
// ^def
3+
4+
type t = int
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
let y: int
22
// ^def
3+
4+
type t

analysis/tests/src/expected/Cross.res.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,9 @@ TypeDefinition tests/src/Cross.res 28:5
8787
Definition tests/src/Cross.res 31:32
8888
{"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}}
8989

90+
Definition tests/src/Cross.res 34:36
91+
{"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 3, "character": 5}, "end": {"line": 3, "character": 6}}}
92+
93+
TypeDefinition tests/src/Cross.res 37:37
94+
{"uri": "DefinitionWithInterface.resi", "range": {"start": {"line": 3, "character": 0}, "end": {"line": 3, "character": 12}}}
95+

0 commit comments

Comments
 (0)