Bring tcTyConScopedTyVars into scope in tcClassDecl2
It is possible that the type variables bound by a class header will map to
something different in the typechecker in the presence of
StandaloneKindSignatures
. tcClassDecl2
was not aware of this, however,
leading to #19738 (closed). To fix it, in tcTyClDecls
we map each class TcTyCon
to
its tcTyConScopedTyVars
as a ClassScopedTVEnv
. We then plumb that
ClassScopedTVEnv
to tcClassDecl2
where it can be used.
Fixes #19738 (closed).