Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finding references for impl methods does not traverse usages via trait #170

Open
mkaput opened this issue Jan 13, 2025 · 0 comments
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mkaput
Copy link
Member

mkaput commented Jan 13, 2025

Repro:

#[derive(Drop)]
struct Foo {}

trait FooTrait {
    fn area(self: @Foo) -> u64;
}

impl FooImpl of FooTrait {
    fn are<caret>a(self: @Foo) -> u64 { 0 }
}

fn main() {
    let foo = Foo {};
    let x = foo.area();
}

This does not return foo.<sel>area</sel>().

Note that the expected outcome is to find all references to this implementation method. This means that if FooTrait would also be implemented for another struct, Bar, the usage bar.area() would not be picked up because it's not routed through FooImpl.

The same applies for alternative implementations of a same trait for same struct (say, FooImplBis).

@mkaput mkaput added the bug Something isn't working label Jan 13, 2025
@mkaput mkaput added this to the Goto milestone Jan 13, 2025
@mkaput mkaput self-assigned this Jan 13, 2025
@mkaput mkaput moved this to Backlog in CairoLS Jan 13, 2025
@mkaput mkaput added this to CairoLS Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant