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 #382. Remove spurious method call error in function definition. #396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zengmao
Copy link

@zengmao zengmao commented Dec 12, 2024

Fixes #382 with a single small change in src/linting/checks.jl. In test/runtest.jl, I've added the following new test which only passes with the new code:

cst = parse_and_pass("""
function f(a::T, invert=false)::T where {T <: Integer}
    invert ? -a : a
end""")
@test !StaticLint.haserror(cst.args[1].args[1].args[1].args[1])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant