-
-
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
jl_egal_types: don't reject equivalence just for gensyms #39778
Conversation
I'm not certain this is sufficiently safe, but a safer version would seem to require checking equivalent usage of different names...which seems like a lot of overhead for something that needs to be fast. But if others think this is necessary, please do offer a hint or two, I'm rusty on this code. (Presumably a list-of-pair substitutions would suffice, but there's quite a lot of overhead to that.) |
I think the right way to do this is to have |
This fixes the following: ``` julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end ERROR: invalid redefinition of constant Symmetric ``` `Core._equiv_typedef` returns false which ends up triggering the error.
65ad8e9
to
af8ff73
Compare
This fixes the following: ``` julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end ERROR: invalid redefinition of constant Symmetric ``` `Core._equiv_typedef` returns false which ends up triggering the error. (cherry picked from commit 6968e47)
…9778) This fixes the following: ``` julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end ERROR: invalid redefinition of constant Symmetric ``` `Core._equiv_typedef` returns false which ends up triggering the error.
…9778) This fixes the following: ``` julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end ERROR: invalid redefinition of constant Symmetric ``` `Core._equiv_typedef` returns false which ends up triggering the error.
This fixes the following: ``` julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end julia> struct Symmetric{T,S<:AbstractMatrix{<:T}} <: AbstractMatrix{T} data::S uplo::Char end ERROR: invalid redefinition of constant Symmetric ``` `Core._equiv_typedef` returns false which ends up triggering the error. (cherry picked from commit 6968e47)
This fixes the following:
Core._equiv_typedef
returns false which ends up triggering the error.This is the main part of fixing timholy/Revise.jl#599.