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

Linter: "Invalid redefinition of constant" in if-else block #218

Closed
CameronBieganek opened this issue Sep 2, 2020 · 1 comment
Closed
Assignees
Labels

Comments

@CameronBieganek
Copy link

Both of the following are valid functions, but the first one shows an "Invalid redefinition of constant" linting error.

struct Asdf end

function foo(x)
    if x > 0
        ret = Asdf
    else
        ret = "hello"
    end
end

function foo(x)
    if x > 0
        ret = Asdf()
    else
        ret = "hello"
    end
end

Screen Shot 2020-09-02 at 12 30 16 PM

@ZacLN ZacLN self-assigned this Sep 2, 2020
@ZacLN ZacLN transferred this issue from julia-vscode/julia-vscode Sep 2, 2020
@davidanthoff davidanthoff added this to the Backlog milestone Sep 2, 2020
ZacLN added a commit that referenced this issue Jan 10, 2021
@ZacLN
Copy link
Contributor

ZacLN commented Jan 10, 2021

88d94c6

@ZacLN ZacLN closed this as completed Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants