Skip to content

@overload function evaluation isn't best match? #2954

Answered by erictraut
dvoraen asked this question in Q&A
Discussion options

You must be logged in to vote

This is expected behavior. Overloads are evaluated in the order in which they are defined. Since None is a subtype of object, you need to swap the order of the overloads so the None overload is tested first.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dvoraen
Comment options

Answer selected by dvoraen
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