Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions tests/test-dirs/type-enclosing/jkind-hover.t
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ Test that hovering over jkind annotations shows their full expansion.
> type t6 : bits32
> type t7 : bits32 mod portable contended
> type t8 : void
> module type S = sig
> val f : ('a : immediate). 'a -> 'a
> val g : ('b : bits32) -> ('b : value mod portable)
> end
> EOF

$ hover 1 14 1
Expand Down Expand Up @@ -94,3 +98,20 @@ Test that hovering over jkind annotations shows their full expansion.
type t8 : void
^
"void" : "void mod non_float"

$ hover 10 18 1
val f : ('a : immediate). 'a -> 'a
^
"immediate)" : "value mod global many stateless immutable external_ non_float"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it print the closing bracket here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't invesitgated this much, but I suspect that it's a bug in the parser where the wrong location is being recorded. There's some other tests in this file where an extra following character is printed (but in those other cases, it's a space rather than a paren).


$ hover 11 18 1
val g : ('b : bits32) -> ('b : value mod portable)
^
"bits32)" : "bits32 mod non_float"

# CR-someday: This is failing because of poor error recovery.
$ hover 11 35 2
val g : ('b : bits32) -> ('b : value mod portable)
^
"('b : value mod portable)" : "'a"
"('b : bits32) -> ('b : value mod portable)" : "'b -> 'a"