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

Underscore cleanup happening in early return #24

Open
Victorious3 opened this issue May 21, 2023 · 0 comments
Open

Underscore cleanup happening in early return #24

Victorious3 opened this issue May 21, 2023 · 0 comments
Labels
bug Something isn't working compile Generating of the IR
Milestone

Comments

@Victorious3
Copy link
Contributor

The function in question in server.pr:

def go_to_definition(id: int, params: DefinitionParams) {
    let path = uri_to_path(params.textDocument.uri)
    let module = toolchain::find_module_by_path(path)
    if not module { send_reply(id, null); return }	
    let node = find_node_at(module, params.position)
    if not node { send_reply(id, null); return } // <- Cleanup of the underscore happens here
    
    var sloc: parser::SourceLoc
    
    let name, _ = find_member(node) // <- Underscore should come in here
    ...
}

Clearly this is some bug with a variable being used before its defined.

@Victorious3 Victorious3 added the bug Something isn't working label May 21, 2023
@Victorious3 Victorious3 added this to the 0.4 milestone Nov 17, 2023
@Victorious3 Victorious3 added the compile Generating of the IR label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compile Generating of the IR
Projects
None yet
Development

No branches or pull requests

1 participant