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

Invalid "function not used" warning for functions with default valued parameter. #895

Closed
gallandarakhneorg opened this issue Dec 17, 2018 · 0 comments

Comments

@gallandarakhneorg
Copy link
Member

gallandarakhneorg commented Dec 17, 2018

Let the SARL code:

class X {
    private def f1(a : int = 0) : void {
    }
    def f2 {
         f1
    }
}

The previous code causes a warning "f1 is never used".
It is not true because f1 is called without argument, i.e. the default valued parameter is not considered when checking the calls to the functions.

@gallandarakhneorg gallandarakhneorg added this to the 0.9 milestone Dec 17, 2018
@gallandarakhneorg gallandarakhneorg self-assigned this Dec 17, 2018
@gallandarakhneorg gallandarakhneorg changed the title Invalid "function not used" warning. Invalid "function not used" warning for functions with default valued parameter. Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant