-
-
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
Dispatching on T
where Core.Compiler.iskindtype(T)
is broken
#11840
Comments
This may be the same bug that is breaking
|
Reduced test case: julia> f(::Type) = "Type";
julia> f(::DataType) = "DataType";
julia> f(Type)
"DataType"
julia> f(AbstractVector)
"DataType" If the order of the calls is reversed, then the result is correct: julia> f(::Type) = "Type";
julia> f(::DataType) = "DataType";
julia> f(AbstractVector)
"Type"
julia> f(Type)
"DataType" |
I'm seeing the
This is from the JuMP tests running in FactCheck; I haven't found a way to isolate the problem. |
minimalist testcase: julia> f(::DataType) = 1; f(x::Type) = 2
f (generic function with 2 methods)
julia> f(Vector.body) # this "poisons" the cache for when the identical TypeConstructor shows up later
1
julia> f(Vector) # this should return 2 since Vector is a TypeConstructor not a DataType
1 note that Line 639 in 8ea2ad7
plus, we already missed out on some of the TypeConstructor "kind" cache fixup logic just above it because |
…he. fixes #11840 when TypeConstructors showed up as parameters of Type objects in the generic function cache, the type intersection result would trick inference into caching it in the wrong place and using it when it didn't apply. fix that by checking explicitly for arguments declared with ::TypeConstructor and ensuring they are matched and cached correctly
…or inserting/matching Type{T} in the gf cache
Fix of JuliaLang/julia#11840 incorporated. Julia regression uncovered in tests: JuliaLang/julia#12826
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for JuliaLang#11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
this allows us to correct the type signature before passing it to the generated function or returning it from ml_matches this also improves the fix for #11840 to cover Unions of the offending types
The test for this is broken and thus disabled. I think I know a fix for it. |
closed by #18457 (I think? Might have missed something here.) |
Added tests for issues JuliaLang#12580, JuliaLang#18348, JuliaLang#13165, JuliaLang#11803, JuliaLang#12721 Enabled tests for JuliaLang#11840
Added tests for issues JuliaLang#12580, JuliaLang#18348, JuliaLang#13165, JuliaLang#11803, JuliaLang#12721 Enabled tests for JuliaLang#11840
Added tests for issues JuliaLang#12580, JuliaLang#18348, JuliaLang#13165, JuliaLang#11803, JuliaLang#12721 Enabled tests for JuliaLang#11840
no, this isn't a subtyping bug. |
Added tests for issues JuliaLang#12580, JuliaLang#18348, JuliaLang#13165, JuliaLang#11803, JuliaLang#12721 Enabled extra tests for JuliaLang#11840, however, that isssue is not resolved yet but needs tests triggering it.
Added tests for issues JuliaLang#12580, JuliaLang#18348, JuliaLang#13165, JuliaLang#12721 For JuliaLang#11803 it was decidided that no tests are needed. Enabled extra tests for JuliaLang#11840, however, that isssue is not resolved yet but needs new tests triggering it.
Added tests for issues JuliaLang#12580, JuliaLang#18348, JuliaLang#13165, JuliaLang#12721 For JuliaLang#11803 it was decidided that no tests are needed. Enabled extra tests for JuliaLang#11840, however, that isssue is not resolved yet but needs new tests triggering it.
Code in OP works fine now. |
What is it then? |
T
where Core.Compiler.iskindtype(T)
is broken
This testcase has a dispatch error in it:
This throws the error:
The indexing into the tuple is essential to trigger the bug.
The equivalent in 0.3 works.
(edit: slight update)
The text was updated successfully, but these errors were encountered: