### Describe the Bug ```python class A[T: A]: x: int = 1 def __init__(self, a: T): print(a.x) ``` This gives: ``` Object of class `object` has no attribute `x` [missing-attribute] ``` pyrefly seems to ignore the bound of the type parameter of generic class if the type is the class itself. In the above example, `a` should be of type A (or subclass) so it should have the `x` attribute. ### Sandbox Link https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSIAxlKnHAAQCCA2gCqJMC6iAOuvQPr4OEdABd6AXnoBGPn0H1MMMPQD6a0RDEaAFHBhQwAGnqoOrAJS9%2BiwcQBOosbtSF8lkMZBkHKqKSEYrgAtlAUAMT0AAqkfmAB9GhYePj0lLjokADmAK4OqGIQmYR8UQDKMDD0ABZiYsRwiAD0zb7%2BgbgO2c0w6M2YuJRwzRlZEHkFRZnN9GBdZgBuqNCo2LDpmTn5hcX8uMTT6HCl6GRiNZkAtIswDnB7UvQ8IADMhDIATC98IAC%2B3lQlCKtwAYtAYBRkjgCCRyH8gA ### (Only applicable for extension issues) IDE Information _No response_
Describe the Bug
This gives:
pyrefly seems to ignore the bound of the type parameter of generic class if the type is the class itself.
In the above example,
ashould be of type A (or subclass) so it should have thexattribute.Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSIAxlKnHAAQCCA2gCqJMC6iAOuvQPr4OEdABd6AXnoBGPn0H1MMMPQD6a0RDEaAFHBhQwAGnqoOrAJS9%2BiwcQBOosbtSF8lkMZBkHKqKSEYrgAtlAUAMT0AAqkfmAB9GhYePj0lLjokADmAK4OqGIQmYR8UQDKMDD0ABZiYsRwiAD0zb7%2BgbgO2c0w6M2YuJRwzRlZEHkFRZnN9GBdZgBuqNCo2LDpmTn5hcX8uMTT6HCl6GRiNZkAtIswDnB7UvQ8IADMhDIATC98IAC%2B3lQlCKtwAYtAYBRkjgCCRyH8gA
(Only applicable for extension issues) IDE Information
No response