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

Fix panic caused by nil pointer dereference in "extract" command #211

Merged

Commits on Feb 28, 2020

  1. Add a nil pointer check before dereferencing an identifier's Obj

    When walking the AST during extraction, if an identifier in a composite
    literal is encountered that does not define in that file, the `Obj`
    field of the `ast.Ident` will be nil.
    
    Rather than panicking in this case, have the literal string extraction
    function return false (no string found).
    
    Also, add a test case representing this scenario.
    patgrasso committed Feb 28, 2020
    Configuration menu
    Copy the full SHA
    f2c42b9 View commit details
    Browse the repository at this point in the history