Skip to content

Fix FunctionDebugInfo.signature_location #135

Closed as not planned
Closed as not planned

Description

@integraledelebesgue

Sometimes, signature_location is populated with location of a wrong syntax node.

Reproduction

For the following code:

fn foo(x: felt252) -> felt252 {
    let mut y = x;
    while y != 0 {
        y -= 1;
    }
    y
}

#[test]
fn test_foo() {
    foo(5);
}

we have one signature location pointing to:

while y != 0 {
    y -= 1;
}

Activity

  1. piotmag769 commented on Jun 1, 2026

    @piotmag769
    Collaborator

    This location is correct since this is a loop function (loops compile to recursive functions, since CASM does not support iteration due to its memory model)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions