You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We allow shadowed type parameters, which can lead to confusing diagnostics.
structS<T> {
vart: Tinit<T>(_myT : T) {
t = myT// error: cannot assign value of type 'T' to type 'T'
}
}
In this case, there are two rigid type variables, one for the outer parameter and one for the inner parameter, but since they are both rigid, they can't be equal.
Emitting a warning would guide the programmer to simplifying their code so that we can produce a better diagnostic.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 5db23a1c00e99b556cb85597f6d03045
Issue Description:
We allow shadowed type parameters, which can lead to confusing diagnostics.
In this case, there are two rigid type variables, one for the outer parameter and one for the inner parameter, but since they are both rigid, they can't be equal.
Emitting a warning would guide the programmer to simplifying their code so that we can produce a better diagnostic.
The text was updated successfully, but these errors were encountered: