We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
:consistent
Minimal reproducer for both nightly and v1.11:
struct A{X} end struct B{X, Y <: A{X}} end f() = Val{B{X, A{X}} where {X}}() Base.infer_effects(f, Tuple{}) # not consistent
Just removing the constraint on a struct type parameter makes effect inference work fine:
struct
struct A{X} end struct B{X, Y} end f() = Val{B{X, A{X}} where {X}}() Base.infer_effects(f, Tuple{}) # consistent
Is this behavior suboptimal, or is there some nonobvious reason why it is required for correctness?
The text was updated successfully, but these errors were encountered:
Another one:
struct A{X} end struct B{X, Y <: A{X}, Z} end f() = Val{B{Int, A{Int}, Z} where {Z}}() Base.infer_effects(f, Tuple{}) # not consistent
Funny thing is, Val{B{Int, A{Int}, Z} where {Z}}() === Val{B{Int, A{Int}}}(), but this infers as consistent: f() = Val{B{Int, A{Int}}}().
Val{B{Int, A{Int}, Z} where {Z}}() === Val{B{Int, A{Int}}}()
f() = Val{B{Int, A{Int}}}()
Sorry, something went wrong.
No branches or pull requests
Minimal reproducer for both nightly and v1.11:
Just removing the constraint on a
struct
type parameter makes effect inference work fine:Is this behavior suboptimal, or is there some nonobvious reason why it is required for correctness?
The text was updated successfully, but these errors were encountered: