Skip to content

nodiscard in overloaded functions #3203

Answered by tomlau10
maattch asked this question in Q&A

You must be logged in to vote

it now warn about redundant parameters.

it shouldn't, since it can find a definition for the signature fun(integer, true)

demo


how did you test it?
unless you define your overload function signature incorrectly (eg typo in their function names)
otherwise redundant parameters should not be shown 🤔

demo with redundant parameters

notice that I incorrectly type get_thing_table as get_thing_table2 => which causes them to be new function instead of overload

Replies: 1 comment 3 replies

You must be logged in to vote
3 replies
@maattch

@tomlau10

Answer selected by maattch
@maattch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants