-
-
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
Should error on ignored type parameter in left-hand side of type alias #38715
Comments
Since they're equivalent, superfluos type parameters are no longer printed on 1.6. Makes types in errors and stacktraces much more compact. I think the relevant PR was #36107.
|
The LHS is syntax for
And the unused |
@Seelengrab I think you misunderstood my concern @vtjnash Thanks for the explanation. I'm not readily finding another conversation about unused type parameters, and that seems to be the reason underlying the non-error on what I want to error. As a side note, I wish you would not close the issues so quickly. Perhaps we want to improve the documentation. Or we want to acknowledge there may be something going on, but still won't fix it, in which case we definitely want to document it. In any case, I know a closed issue doesn't mean there can't be a discussion, so: Currently, julia> Meta.@lower MyType{K} = Int64
:($(Expr(:thunk, CodeInfo(
@ none within `top-level scope'
1 ─ const MyType
│ K = Core.TypeVar(:K)
│ %3 = Core.UnionAll(K, Int64)
│ MyType = %3
└── return %3
))))
julia> Meta.@lower MyType = Int64 where {K}
:($(Expr(:thunk, CodeInfo(
@ none within `top-level scope'
1 ─ K = Core.TypeVar(:K)
│ %2 = Core.UnionAll(K, Int64)
│ MyType = %2
└── return %2
)))) so even if |
Closing issues helps others focus on other work. It's an aspect of triage and email management. We almost never lock them, since continued discussion and PR are welcome. Yes, more precisely, there's a |
The question is: Can we raise an error on |
Not mentioned in https://docs.julialang.org/en/v1/manual/types/#UnionAll-Types
Sorry in advance if this is a duplicate issue.
The text was updated successfully, but these errors were encountered: