Is your feature request related to a problem?
This code is currently legal:
class MyClass<T> {
class Inner(p: T) {
attr a: T
fun f<S>(p: T, q: S)
}
enum InnerEnum {
Variant(p: T)
}
}
Desired solution
However, a class/enum variant should only be able to refer to its own type parameters. A function should be able to refer to its own type parameters and the type parameters of the containing class. Add validation for this.
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response