-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
method_exists not working with TypeVar-parameterized types #9043
Comments
Covered by #8974. Also please do not call |
I'm using this over in Traits.jl, see mauro3/Traits.jl#2. I think, to store the signature of a parameterized function in a trait definition a TypeVar is needed as simple types cannot store that kind of subtype relationship. But that may change with #6984 & #8974. |
It will need to change. I cannot figure out how to make the system work with unrestricted use of TypeVars. For example:
This breaks the rule that |
Thanks for this clarification. I'm looking forward to #8974 sorting this all out! |
These two bugs do not matter anymore as the new tests do not rely on method_exists: method_exists_bug1 = false # see JuliaLang/julia#8959 method_exists_bug2 = false # see JuliaLang/julia#9043 and #2
These two bugs do not matter anymore as the new tests do not rely on method_exists: method_exists_bug1 = false # see JuliaLang/julia#8959 method_exists_bug2 = false # see JuliaLang/julia#9043 and #2
Using
TypeVar
s for non-parameterized types works withmethod_exists
:(Edit: Actually, shouldn't the second last return
true
as the method does exist for all<:Integer
?)But not for parameterized types:
I would have thought the latter two should return
true
.The text was updated successfully, but these errors were encountered: