Open
Description
The test go_to_definition_for_structs
tests the "go to definition" handler in this file:
contract;
/// My data enum
enum Data {
First: (),
Second: (),
}
/// My struct type
struct MyStruct<T, U> {
g: U,
x: T,
y: Data,
z: (u64, Data),
t: [Data; 5],
j: (u32, (Data, [Data; 2])),
o: Option<Identity>,
}
The request points to "U" of "g: U", and expects the response point to "U" of "struct MyStruct<T, U>". Which works currently; but if an impl
item appears after the struct declaration such as
contract;
/// My data enum
enum Data { ... }
/// My struct type
struct MyStruct<T, U> { ... }
trait A {}
impl<T, U> A for MyStruct<T, U> {}
Now, the same "go to definition" request points to the second "U" of the new line "impl<T, U> A for MyStruct<T, U> {}", which is wrong.